Creating an XML document

You can create an application to create an XML document.

Procedure

  1. 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.
  2. Call the tpf_doc_createXMLstructure function to create the beginning of the XML structure that will represent the XML document.
  3. 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.
  4. 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.
  5. Store the XML document that is in the buffer that was created by the tpf_xml_buildDocument function in an appropriate location.
  6. Call the tpf_doc_terminate_handle function to release any storage that was obtained by the z/TPF parser APIs.