Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

find(:scope,) examples

  • Loading branch information...
commit 8cce3d86f733e6e8d14d2db102943513c67ec6b6 1 parent 439362c
Tobias Lütke authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 README
8 README
View
@@ -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... }
+
Please sign in to comment.
Something went wrong with that request. Please try again.