Limitations of XML built-in classes
Built-in XML classes have some limitations you must be aware of.
The om.* built-in XML classes
are
provided for convenience and design for basic XML usage, 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.
om.*
built-in classes:-
There is no automatic charset conversion done when reading of writing XML documents:
The encoding used by an XML file (
<?xml ... encoding='UTF-8' ?>
) must match the current application locale defined for the runtime. -
There is no DTD (Document Type Definition) nor is there XSD (XML Schema Definition) support for XML Schema validation.
For example, 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.
-
When reading XML documents, the
<!DOCTYPE>
part (the document type declaration) must not contain sub-elements such as<!ENTITY>
.If
<!DOCTYPE>
is present and contains no sub-elements, it will just be ignored.
For a complete XML support, use the full-featured XML classes provided in the web services extension.