rootElement property

  1. @override
XmlElementNaturalImpl rootElement
final

Return the root XmlElement of the document, or throw a StateError if the document has no such element.

For example, the following code prints <books />:

var xml = '<?xml version="1.0"?>'
          '<books />';
print(XmlDocument.parse(xml).rootElement);

Implementation

@override
final XmlElementNaturalImpl rootElement;