XMLDoc.TXMLDocument.DocumentElement

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From XMLDoc.pas

	property DocumentElement: IXMLNode read GetDocumentElement write SetDocumentElement;


Unit: XMLDoc

Type: property

Visibility: public

Member Of: TXMLDocument

C++ Information

From XMLDoc.hpp

	__property System::DelphiInterface<Xmlintf::IXMLNode> DocumentElement = {read=GetDocumentElement,write=SetDocumentElement};


Unit: XMLDoc

Type: property

Visibility: public

Member Of: TXMLDocument

Description

Provides access to the root node of the XML document.


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.

See Also

Personal tools
Translations
Newest Version