From RAD Studio API Documentation
Jump to: navigation, search


property Options: TXMLDocOptions read GetOptions write SetOptions


__property Xml::Xmlintf::TXMLDocOptions Options = {read=GetOptions, write=SetOptions, default=29};


Type Visibility Source Unit Parent
property published
Xml.XMLDoc TXMLDocument


Influences various aspects of the document's behavior.

Set Options to configure how you want the document to respond when the application tries to read nodes or attributes that do not exist, when it creates a new namespace when adding a node, when it generates XML text from the nodes in the document, or whether it saves its value automatically when you close the document. Options can include any of the following values:

Value Meaning


If the application tries to read a node by name, using the Nodes property of an IXMLNodeList interface, and that node does not exist, then the application creates a new node using the specified name.


When formatting the XML text from the parsed set of nodes, child nodes are automatically indented from their parent nodes.


When reading the value of an attribute that does not exist, the value is given as a Null Variant (as opposed to a value of an empty string).


When generating the name of a new node, the value is automatically given a namespace prefix if a namespace URI is supplied.


When the AddChild method must create a new namespace for the node, it also adds a namespace attribute to declare that new namespace. If doNamespaceDecl is not included, AddChild creates the new namespace but does not add an attribute to declare it.


When you close the document (set Active to false), any changes are automatically saved back to the file specified by FileName or to the XML property.

See Also