Creating an XML document
You can create an application to create an XML document.
Procedure
- Call the tpf_doc_initialize_handle function to initialize a z/TPF parser API handle that will be used on following z/TPF parser API calls to build the XML document. Pass a null pointer for the XML structure pointer and specify NO_PARSER for the parser type.
- Call the tpf_doc_createXMLstructure function to create the beginning of the XML structure that will represent the XML document.
- Call the tpf_doc_insertElement, tpf_doc_appendElement,
and
tpf_doc_position*functions to add new elements to the XML structure that will represent the XML document. - Call the tpf_doc_buildXMLdocument function to traverse the XML structure that represents the XML document and build the complete XML document (in XML format) in a buffer.
- Store the XML document that is in the buffer that was created by the tpf_xml_buildDocument function in an appropriate location.
- Call the tpf_doc_terminate_handle function to release any storage that was obtained by the z/TPF parser APIs.