Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
REXML
/
Element
/
//opt/alt/ruby21/share/ri/2.1.0/system/REXML/Element/each_element_with_attribute-i.ri
U:RDoc::AnyMethod[iI" each_element_with_attribute:EFI"/REXML::Element#each_element_with_attribute;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"IIterates through the child elements, yielding for each Element that ;TI"$has a particular attribute set.;To:RDoc::Markup::List: @type: NOTE:@items[ o:RDoc::Markup::ListItem:@label[I"key;T; [o; ; [I",the name of the attribute to search for;To;;[I" value;T; [o; ; [I"the value of the attribute;To;;[I"max;T; [o; ; [I"<(optional) causes this method to return after yielding ;TI")for this number of matching children;To;;[I" name;T; [o; ; [I";(optional) if supplied, this is an XPath that filters ;TI"the children to check.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"Jdoc = Document.new "<a><b @id='1'/><c @id='2'/><d @id='1'/><e/></a>" ;TI"# Yields b, c, d ;TI"<doc.root.each_element_with_attribute( 'id' ) {|e| p e} ;TI"# Yields b, d ;TI"Adoc.root.each_element_with_attribute( 'id', '1' ) {|e| p e} ;TI"# Yields b ;TI"Ddoc.root.each_element_with_attribute( 'id', '1', 1 ) {|e| p e} ;TI"# Yields d ;TI"Hdoc.root.each_element_with_attribute( 'id', '1', 0, 'd' ) {|e| p e};T:@format0: @fileI"lib/rexml/element.rb;T:0@omit_headings_from_table_of_contents_below00I"Element;F[ I"(( key, value=nil, max=0, name=nil );T@;FI"Element;TcRDoc::NormalClass00