IBM®
Skip to main content
    United States [change]      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     
     
  XML on TPF: A Short Tutorial IBM

XML on TPF: A Short Tutorial — Page 4 of 14
Create the Sample XML Data Based on the DTD

An XML document is a file that contains data surrounded by XML markup. It must have an XML declaration statement at the top of the document and may be based on a DTD or XML Schema document.

The two sample applications that you will save to your workstation later in this tutorial demonstrate both validating and nonvalidating parsing. The first XML document is based on the DTD you saved on the previous page. It begins with the XML declaration statement, which includes the encoding used in the document. For example:

        <?xml version="1.0" encoding="ISO-8859-1"?>
        
The next statement declares the root element of the XML document (PNRroot) and the DTD on which the XML document is written (pnrdtd):
        <!DOCTYPE PNRroot SYSTEM "pnrdtd">
        

Before continuing, do the following:
  1. Open the XML document (based on the DTD) in another browser window.
  2. See how the data is structured to match the DTD that you saved on the previous page.
  3. Click File --> Save As.
  4. Save the file in C:\xmltut as pnrd.xml. The default file name may be pnrd.xml.txt. If this is true, ensure that you remove the .txt extension.
  5. Close the window by clicking the X in the upper-right corner.
Once you have saved the XML document, you are ready to continue.

For More Information
See the TPF XML User's Guide for the following:

  • A list of books and Web sites for learning about XML documents and their syntax
  • More information about specifying the encoding of your documents on the TPF 4.1 system.

PreviousNext

Back to the Beginning
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14

 

Close This Window.

 

    About IBM Privacy Contact