Element
The Element
interface provides access to the XML document's structure and
data. Every XML element is translated into a single Element
node. The document's root
element is accessible through the documentElement
property of the Document
object. From this node, it is
possible to re-create the full structure of the original XML
document by traversing the element tree.
// Get the XML document's root element Element elem = doc.getDocumentElement( );
This interface extends the basic Node
interface to allow access to the
XML attributes of the document element. Two sets of methods allow
access to attribute values, either as Attr
object trees or as simple DOMStrings
.