XML_Document.child_count
child_count
Group: Metadata
Documentation
Gets the number children of an XML document. child_count
only counts child elements and child text nodes that are not 100% whitespace. Other node types, such as comments, are not included in the count.
Examples
Get the number of children of an document.
XML_Document.from_text '<foo> <bar>hello</bar> <bar>hello2</bar>< </foo>' . child_count
# => 1