116 Chapter 4 " Using XML in the .NET Framework The Document interface represents the top-level root in an XML docu- ment, and implements the Node interface. It is the root of the XML tree, and provides the primary access to the XML contained within the document. The attributes and methods of the Document interface are listed in Tables 4.3 and 4.4. Table 4.3   The Document Interface Attributes Attribute Description doctype The Document Type Declaration (DTD) with this document. If DTD is not present, this returns null. documentElement The root element in the document. Table 4.4   The Document Interface Methods Method Description createElement(tagName) Creates and returns an element with the speci- fied tag name. createTextNode(data) Creates and returns a Text object containing the specified string data. createComment(data) Creates and returns a Comment object con- taining the specified string data. createCDATASection(data) Creates and returns a CDATA object containing the specified string data. createAttribute(name) Creates and returns an Attr object with the spec- ified name. The Element interface is the most common type of node a developer will encounter when working with a DOM XML parser. Considering the XML shown previously in Figure 4.1, every addressBookcategory, and entry element is of type Node.The attributes and methods of the Element interface are listed in Tables 4.5 and 4.6. Table 4.5   The Element Interface Attributes Attribute Description tagName The name of the element. www.syngress.com 155_xml_net_pd_C04.qk  3/6/02  1:57 PM  Page 116