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 elemNameargument. In this case, elemNameis 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.