RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLDocument.DocumentElement Property

Provides access to the root node of the XML document.

Pascal
property DocumentElement: IXMLNode;
C++
__property IXMLNode DocumentElement;

Use DocumentElement to access the root node of the XML document. Because XML documents are hierarchical in structure, DocumentElement is the entry point to all data in the XML document. Setting DocumentElement replaces the entire data hierarchy with a new hierarchy of nodes.

Note: For some DOM implementations, if you set DocumentElement, all of the new nodes must already be associated with this document. That is, the new value should be a node that came from the existing node hierarchy or that was created using the CreateNode method.
The IXMLNode interface includes properties and methods for examining and changing the text and attributes of a node, for adding and deleting child nodes, and for traversing the hierarchy of nodes rooted at that node.
Note: DocumentElement is not available unless the XML document is Active.
 

DOMDocument 

Active 

DocumentElement 

CreateNode 

GetDocBinding 

Using TXMLDocument 

Working with XML Nodes

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!