Determines the behavior of the XML PARSE statement and special registers relating to XML events.
Syntax:
>>-.---.----XMLPARSE--"version"---><
+-/-+
Parameters:
- version
- The version of Enterprise COBOL that the XML PARSE statement emulates.
- COMPAT
- The operational behaviors and results of XML PARSE statements are compatible with those of Version 3 of Enterprise COBOL.
- XMLSS
- XML PARSE statements are processed as for Enterprise COBOL version 4. The following XML parsing capabilities are available
only when this option is in effect:
- Enhanced namespace processing
- ENCODING and RETURNING NATIONAL phrases of the XML PARSE statement
- Support for the VALIDATING phrase to enable checking against an XML schema in text format.
Properties:
Default: |
XMLPARSE"XMLSS" |
Phase: |
Syntax Check |
$SET: |
Initial |
Comments:
When XMLPARSE"COMPAT" is set and when running under native COBOL, XML character entities, for example ', are output as individual events. Using <elem attr="baker's dozen"/> as an example, generates the following three elements:
- CONTENT_CHARACTERS(with text "baker")
- CONTENT_CHARACTERS(with text " ' ")
- CONTENT_CHARACTERS(with text "dozen")
When XMLPARSE"XMLSS" is set or when running under JVM COBOL, XML entities are converted to the single character in which they represent and included in the general text that surrounds
them, generating a single event :
- CONTENT_CHARACTERS(with text "baker's dozen")