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/root_node-i.ri
U:RDoc::AnyMethod[iI"root_node:EFI"REXML::Element#root_node;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"BEvaluates to the root node of the document that this element ;TI"Hbelongs to. If this element doesn't belong to a document, but does ;TI"Nbelong to another Element, the parent's root will be returned, until the ;TI" earliest ancestor is found.;To:RDoc::Markup::BlankLine o; ; [I"=Note that this is not the same as the document element. ;TI"IIn the following example, <a> is the document element, and the root ;TI"Lnode is the parent node of the document element. You may ask yourself ;TI"Lwhy the root node is useful: consider the doctype and XML declaration, ;TI"Iand any processing instructions before the document element... they ;TI"Iare children of the root node, or siblings of the document element. ;TI"IThe only time this isn't true is when an Element is created that is ;TI"Gnot part of any Document. In this case, the ancestor that has no ;TI""parent acts as the root node.;To:RDoc::Markup::Verbatim; [ I"+d = Document.new '<a><b><c/></b></a>' ;TI"a = d[1] ; c = a[1][1] ;TI"d.root_node == d # TRUE ;TI"$a.root_node # namely, d ;TI""c.root_node # again, d;T:@format0: @fileI"lib/rexml/element.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@$FI"Element;TcRDoc::NormalClass00