For each global element defined within an XSD specification, a special encode function is generated. This is identical to the encode function for XSD types described above except that the name is formed using the element name instead of the type name and the function does not contain an elemName argument. In this case, elemName is set to the name specified in the XSD global element definition. The encode function name prefix in this case is XmlE_ instead of XmlET_ in order to avoid name clashes when types and global elements have the same name.
These functions are the normal entry points when encoding complete XML message instances. All of the sample programs use a global element definition to define the top-level message to be encoded for a particular application.