Generated XML Decode Functions

Generated C Function Format and Calling Parameters
Procedure for Calling C Decode Functions
Generated C++ Decode Method Format and Calling Parameters
Procedure for Using the C++ Control Class Decode Method

A major difference between generated XER decode functions and generated XML decode functions in ASN1C version 6.0 and later is that the XML functions no longer use the Simple API for XML (SAX) interface. Instead, the XML runtime now uses an XML pull-parser developed in-house for improved efficiency. The pull-parser also provides a similar interface to that of binary encoding rules such as BER or PER meaning easier integration with existing encoding rules. Finally, the pull-parser interface does not require integration with any 3rd-party XML parser software.

XML decode functions are generated when the -xml switch is specified on the command line. For each ASN.1 production defined in the ASN.1 source file, a C XML decode function is generated. This function will parse the data contents from an XML message of the corresponding ASN.1 or XML schema type and populate a variable of the C type with the data.

If C++ code generation is specified, a control class is generated that contains a DecodeFrom method that wraps this function. This function is invoked through the class interface to encode an ASN.1 message into the variable referenced in the msgData component of the class.