Permalink
Browse files

find(:scope,) examples

  • Loading branch information...
1 parent 439362c commit 8cce3d86f733e6e8d14d2db102943513c67ec6b6 @tobi committed Mar 30, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 README
View
8 README
@@ -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.