XML on TPF: A Short Tutorial Page 14 of 14
Congratulations!
This tutorial has provided you with an understanding of how TPF applications written in C++ language can access XML data.
To gain additional hands-on experience with XML on TPF, see the TPF XML User's Guide to learn how to use the sample programs that came with the ported XML4C code.
What Do You Think?
Did this tutorial help you to understand XML on TPF? Did you enjoy it? Do you have suggestions for ways we could improve the tutorial? Send your feedback to tpfid@us.ibm.com.
Optional Step: Supplemental Material
An XML document can present data in elements as element data or as attribute values. Currently, members of the XML community have different opinions about whether one method is better (or more efficient) than the other. To explore this issue further
by viewing a slightly different XML document, the following provides a supplemental XML document and DTD:
See how elements, nested elements, and attributes are used.
Click File --> Save As.
Save the file as pnr1dtd. The default file name may be pnr1dtd.txt or pnr1dtd.html. If this is true, ensure that you remove the .txt or .html extension. (The XML document calls the DTD so the name must match exactly. For this, there is no extension to the DTD file.)
Close the window by clicking the X in the upper-right corner.
See how the elements, nested elements, and attributes used match the DTD.
Click File --> Save As.
Save the file as pnr1.xml. The default file name may be pnr1.xml.txt. If this is true, ensure that you remove the .txt extension.
Close the window by clicking the X in the upper-right corner.
Once you have saved these files, you can FTP them to your TPF 4.1 test system and use the sample applications with
the new XML document and its associated DTD by changing the ZFILE command to reflect the name of the XML
document.