Skip to content

Commit

Permalink
find(:scope,) examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Luetke (home) committed Mar 30, 2008
1 parent 439362c commit 8cce3d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Example for parsing xml:


xml = XmlNode.parse('<feed attr="1"><element>text</element><element>text</element></feed>')
xml['attr'] #=> '1'
xml['attr'] #=> '1'
xml.find(:first, 'element')
xml.find(:all, 'element')

xml.children['element'].text #=> 'text'
xml.children.each { |e| e... }
xml.children.each { |e| e... }

0 comments on commit 8cce3d8

Please sign in to comment.