O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Documents

An entire XML document is represented by a special type of node. An important concept to appreciate at this point is that the root element of an XML document is not the root node of the DOM. If it were, it would not be possible for the DOM to contain nodes that represent markup around the root element, such as a preceding comment or following processing instruction. The Document interface extends the Node interface, adding a number of methods. The first four of these methods obtain information about the document. The remainder are 'factory' methods, used to create new objects to put in the document:

 DocumentType getDoctype(); DOMImplementation getImplementation(); Element getDocumentElement(); NodeList getElementsByTagName(String tagName); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required