TXmlDocument represents a DOM representation of an XML file.
Besides all properties and methods inherited from {@link TXmlElement},
you can load an XML file or string by {@link loadFromFile} or {@link loadFromString}.
You can also get the version and encoding of the XML document by
the Version and Encoding properties.
To construct an XML string, you may do the following:
$doc=new TXmlDocument('1.0','utf-8');
$doc->TagName='Root';
$proc=new TXmlElement('Proc');
$proc->setAttribute('Name','xxxx');
$doc->Elements[]=$proc;
$query=new TXmlElement('Query');
$query->setAttribute('ID','xxxx');
$proc->Elements[]=$query;
$attr=new TXmlElement('Attr');
$attr->setAttribute('Name','aaa');
$attr->Value='1';
$query->Elements[]=$attr;
$attr=new TXmlElement('Attr');
$attr->setAttribute('Name','bbb');
$attr->Value='1';
$query->Elements[]=$attr;
The above code represents the following XML string:
1
1