RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLDocument.Options Property

Influences various aspects of the document's behavior.

Pascal
property Options: TXMLDocOptions;
C++
__property TXMLDocOptions Options;

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 
doNodeAutoCreate  
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.  
doNodeAutoIndent  
When formatting the XML text from the parsed set of nodes, child nodes are automatically indented from their parent nodes.  
doAttrNull  
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).  
doAutoPrefix  
When generating the name of a new node, the value is automatically given a namespace prefix if a namespace URI is supplied.  
doNamespaceDecl  
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.  
doAutoSave  
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.  

 

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