summaryrefslogtreecommitdiff
path: root/lib/rexml/element.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/element.rb')
-rw-r--r--lib/rexml/element.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb
index 83e5f6e..f982599 100644
--- a/lib/rexml/element.rb
+++ b/lib/rexml/element.rb
@@ -895,11 +895,11 @@ module REXML
# that XPaths are automatically filtered for Elements, so that
# non-Element children will not be yielded
# doc = Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
- # doc.root.each {|e|p e} #-> Yields b, c, d, b, c, d elements
- # doc.root.each('b') {|e|p e} #-> Yields b, b elements
- # doc.root.each('child::node()') {|e|p e}
+ # doc.root.elements.each {|e|p e} #-> Yields b, c, d, b, c, d elements
+ # doc.root.elements.each('b') {|e|p e} #-> Yields b, b elements
+ # doc.root.elements.each('child::node()') {|e|p e}
# #-> Yields <b/>, <c/>, <d/>, <b/>, <c/>, <d/>
- # XPath.each(doc.root, 'child::node()', &block)
+ # XPath.elements.each(doc.root, 'child::node()', &block)
# #-> Yields <b/>, <c/>, <d/>, sean, <b/>, <c/>, <d/>
def each( xpath=nil )
XPath::each( @element, xpath ) {|e| yield e if e.kind_of? Element }