Limitations of XML built-in classes
Built-in XML classes have some limitations you must be aware of.
The built-in XML classes are provided for convenience, to help you manipulate XML content easily without loading a complete external XML library such as Java XML classes or a C-based XML libraries.
The features of these built-in classes are limited to basic XML usage. For example, there is no DTD / XML Schema validation done; you can create the same attribute twice or set an invalid attribute value. You must take care to follow the definition of the XML document when using these classes.
For a complete XML support, use the full-featured XML classes provided in the web services extension.