Migrating to XMLNSC
The XMLNSC parser offers the best combination of features and performance for most applications.
Reasons to migrate
If your message flow uses the XMLNS or XML domain, you might want to migrate a message flow to XMLNSC to take advantage of the XML schema validation. If your message flow uses the MRM domain, you might want to migrate to XMLNSC to obtain standards-compliant validation, and a large reduction in processor usage.Migrating from the XMLNS or XML domain
The XMLNSC parser differs from the XMLNS parser in the following ways:- The XMLNSC parser builds a compact message tree.
- It uses different field type constants.
- It discards inline DTDs
In most cases, the compact message tree has no effect on
ESQL paths or XPath expressions. Typically, a simple message tree
query produces the same results in XMLNSC as in the XMLNS or XML domain.
Changing the correlation name from XMLNS to XMLNSC is often sufficient,
but care must be taken with the following items:
- Empty elements and null values.
The XMLNSC parser does not always handle empty elements and null values in the same way as XML and XMLNS.
- Complex XPath expressions that navigate to the value of an element,
then to its parent in a single query.
These expressions might produce different results in the XMLNSC domain.
The field type constants that are used by the XMLNSC parser are different from those constants used by XMLNS or XML. Every occurrence of XML.Attribute, XML.XmlDecl, for example, must be changed to use the equivalent XMLNSC field type constant.
The discarding of inline DTDs only affects message flows that process the DTD.
Migrating from MRM XML
The XMLNSC parser differs from the MRM XML parser in the following ways:- The XMLNSC parser uses field types to identify the XML constructs in the message tree. The MRM parser distinguishes attributes from elements by matching the message tree against the message definition.
- When writing a message tree, the XMLNSC parser selects namespace prefixes by detecting and using xmlns attributes in the message tree. The MRM XML parser uses a table in the message set properties.
- The MRM parser does not include the root tag of the XML document in the message tree.