• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using the XML DSO

You also can use the XML DSO that comes with Internet Explorer to handle data in XML format. We’ll see more on XML in Chapter 22, “XML and XSLT.” In XML documents, you create your own tags and elements. In this case, I’ll enclose all our data in an element I’ll call <EMPLOYEES>, and enclose each record in an element I’ll name <ITEM>. To name the fields in each record, you create elements of the same name, such as <NAME> for the Name field, <ID> for the ID field, and so on. Given all that, here’s how I store our employee data as an XML document, data.xml:

(data.xml on the web site)

<?xml version="1.0"?> 
<EMPLOYEES> 
    <ITEM> 
        <NAME>Frank</NAME> 
        <ID>2314</ID> 
        <DEPARTMENT>Shipping</DEPARTMENT> 
        <TITLE>Packer</TITLE> 
        <HIRE_DATE>9-2-2003</HIRE_DATE> 
    </ITEM> 
    <ITEM> 
        <NAME>Martin</NAME> 
        <ID>2315</ID> 
        <DEPARTMENT>Packing</DEPARTMENT> 
        <TITLE>Programmer</TITLE> 
        <HIRE_DATE>9-2-2003</HIRE_DATE> 
    </ITEM> 
    <ITEM> 
        <NAME>Tom</NAME> 
        <ID>2316</ID> 
        <DEPARTMENT>Shipping</DEPARTMENT> 
        <TITLE>Packer</TITLE> 
        <HIRE_DATE>9-2-2003</HIRE_DATE> 
    </ITEM> 
    <ITEM> 
        <NAME>Henry</NAME> 
        <ID>2317</ID> 
        <DEPARTMENT>Shipping</DEPARTMENT> 
        <TITLE>Packer</TITLE> 
        <HIRE_DATE>9-2-2003</HIRE_DATE> 
    </ITEM> 
    <ITEM> 
        <NAME>Paula</NAME> 
        <ID>2318</ID> 
        <DEPARTMENT>Shipping</DEPARTMENT> 
        <TITLE>Packer</TITLE> 
        <HIRE_DATE>9-2-2003</HIRE_DATE> 
    </ITEM> 
</EMPLOYEES> 

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint