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 6 of 14
Create the Sample XML Data Based on the XML Schema

The same sample data can be written in an XML document that is based on the XML Schema rather than the sample DTD. It begins with the XML declaration statement, which includes the encoding used in the document:

        <?xml version="1.0" encoding="ISO-8859-1"?>
        
Next, add the statement to declare the root element of the XML document (PNRroot) and the XML Schema document on which the XML document is written (pnrs.xsd):
        <PNRroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="pnrs.xsd">
        

Before continuing, do the following:
  1. Open the second XML document (based on the XML Schema document) in another browser window.
  2. See how the data is structured to match the XML Schema you saved on the previous page.
  3. Click File --> Save As.
  4. Save the file in C:\xmltut as pnrs.xsd. The default file name may be pnrs.xsd.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