The Final XML Document

[Previous] [Next]

The final XML document is shown here:

 <?xml version="1.0" standalone="yes"?> <html> <head> <title>Northwind Traders Help Desk</title> <base target=""><!--Default link for page--></base> </head> <body text="#000000" bgcolor="#FFFFFF" link="#003399" alink="#FF9933" vlink="#996633"> <!--Default display colors for entire body--> <a name="Top"><!--Anchor for top of page--></a> <table border="0" frame="" rules="" width="100%" align="" cellspacing="0" cellpadding="0"> <!--Rules/frame is used with border.--> <tr align="" valign="Center" bgcolor=""> <td rowspan="" colspan="2" align="Center" valign="" bgcolor=""> <!--Either rowspan or colspan can be used, but not both.--> <!--Valign: top, bottom, middle--> <CellContent cellname="Table Header"> <h1 align="Center">Help Desk</h1> </CellContent> </td> </tr> <tr align="" valign="Top" bgcolor=""> <td rowspan="" colspan="" align="Left" valign="" bgcolor=""> <CellContent cellname="Help Topic List"> <p align=""> <ul type=""> <font face="" color="" size="3"> <b>For First-Time Visitors</b> </font> <li> <a href="FirstTimeVisitorInfo.htm" target=""> First-Time Visitor Information </a> </li> <li> <a href="SecureShopping.htm" target=""> Secure Shopping at Northwind Traders </a> </li> <li> <a href="FreqAskedQ.htm" target=""> Frequently Asked Questions </a> </li> <li> <a href="NavWeb.htm" target=""> Navigating the Web </a> </li> </ul> </p> </CellContent> </td> <td rowspan="" colspan="" align="Left" valign="" bgcolor=""> <CellContent cellname="Shipping Links"> <p align=""> <ul type=""> <font face="" color="" size=""> <b>Shipping</b> </font> <li> <a href="Rates.htm" target=""> Rates </a> </li> <li> <a href="OrderCheck.htm" target=""> Checking on Your Order </a> </li> <li> <a href="Returns.htm" target=""> Returns </a> </li> </ul> </p> </CellContent> </td> </tr> </table> </body> </html> 

The final document looks basically like an HTML document and works like one, but it meets the criteria for being a well-formed XML document. Notice that all of the tags nest properly, all tags are closed, and the root element (<html></html>) encloses all the other elements.

You could have written all of this XML code manually, but it would have been more difficult and you would have been more likely to make a syntax error. There are various XML editors such as XML Authority, XML Instances, and XML Spy that allow you to focus on the structure of your document and the elements that will go into your document without being concerned about the syntax. Of course, once you have finished with the XML editor, you should review the final document to verify that the XML code is actually what you want.



Developing XML Solutions
Developing XML Solutions (DV-MPS General)
ISBN: 0735607966
EAN: 2147483647
Year: 2000
Pages: 115
Authors: Jake Sturm

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net