Limitations when parsing XML documents
The format of the XML document supported by this library is based on the following specifications.
Extensible Markup Language (XML) 1.0 (Fifth Edition)
However, the process of reading and parsing an XML document has the following limitations:
- It is not possible to read XML documents with encodings other than UTF-8 and UTF-16.
- If the XML document contains the following information, the XML_CreateXmlObject function skips them and converts the rest of the information into an XML object.
- doctypedecl (XML document type declaration)
- Comment
- PI (Processing instruction)
In XML, Mixed content that contains child elements and other information can be described in the element, but this library does not support the Mixed content.
When you convert an XML document with Mixed content to an XML object with the XML_CreateXmlObject function, the information other than the child elements in the Mixed content is ignored.
Mixed content:
<letter> Dear Mr.<name>John Smith</name>. Your order <orderid>1032</orderid> will be shipped on <shipdate>2001-07-13</shipdate>. </letter>
Converted XML object:
<letter> <name>John Smith</name> <orderid>1032</orderid> <shipdate>2001-07-13</shipdate> </letter>
- EntityRef other than & < > ' " are replaced with '?'.
- When converting from Unicode to local code, non-convertable characters are replaced with'?'.
- When parsing an XML document, we perform only the minimum required format inspection. Please use another tool to check whether the data is valid as an XML document, regardless of this library.
Limitations when editing XML objects
- When editing an XML object using the functions of this library, if a character code that cannot be converted from local code to Unicode is detected, the functions of this library will fail and return XML_UNICODE_CONVERSION_ERROR error.
- In this library, values cannot be set for nodes that have child nodes (intermediate nodes). Also, you cannot get the value. Requesting such an operation with the functions of this library will return XML_NO_VALUE_IN_INTERMEDIATE_NODE error.
<request_message> ← intermediate nodes <issuer>SALES0001</issuer> <ship_order> ← intermediate nodes <date>2021/09/10</date> <customer> ← intermediate nodes <customerID>C00001</customerID> <name>A corporation</name> </customer> </ship_order> </request_message>
- In this library, it is not possible to add child notes to a node that has a value. Requesting such an operation with the functions of this library will return XML_CHILD_NODE_DISALLOWED_ERROR error.
Limitations when outputting XML documents
- When converting an XML object to an XML document, it is encoded in UTF-8. It cannot be output in other encodings.
Last updated: 2021/09/24