TXMLDocument = class(TComponent, IInterface, IXMLDocument, IXMLDocumentAccess)
class PASCALIMPLEMENTATION TXMLDocument : public System::Classes::TComponent
TXMLDocument represents an XML document.
Use TXMLDocument to represent an XML document. TXMLDocument can read an existing XML document from a file, it can be associated with an in-memory string that is the contents of an XML document, or it can create a new, empty XML document.
When you set the Active property to true, TXMLDocument uses the DOM parser to parse the XML document so that you can examine or modify it. In particular, the DocumentElement property provides an interface to the root node of the document. You can use that interface to access its child nodes and to add or delete child nodes.
When TXMLDocument is created without an Owner, it behaves like an interfaced object. That is, when all references to its interface are released, the TXMLDocument instance is automatically freed. When TXMLDocument is created with an Owner, however, it behaves like any other component, and is freed by its Owner. When you add a TXMLDocument component from the component palette to a form or data module, it is automatically created with an Owner. When the TXMLDocument component is created using the global LoadXMLDocument function (or by a function that the XML Data Binding wizard generates to return the root node of the document), the function creates a TXMLDocument instance without an Owner.
- Tip: To use TXMLDocument in Mac OS X or Mobile applications, in the Object Inspector, set the DOMVendor property to ADOM XML v4 right after dropping this component onto the Form Designer. Otherwise, the TXMLDocument component is no longer usable for iOS/Android/OSX applications.