Professional XML Databases - Chapter 2, part 4 (page 2) | WebReference

Professional XML Databases - Chapter 2, part 4 (page 2)

To page 1current pageTo page 3
[previous] [next]

Professional XML Databases

An Example XML Document

Finally, here's an example of an XML document that would be valid for this DTD:

<?xml version="1.0"?>
<!DOCTYPE SalesData SYSTEM "http://myserver/xmldb/ch03_ex01.dtd" >
<SalesData Status="NewVersion">
   <Invoice InvoiceNumber="1" 
            TrackingNumber="1" 
            OrderDate="01012000" 
            ShipDate="07012000" 
            ShipMethod="FedEx" 
            CustomerIDREF="Customer2">
      <LineItem Quantity="2" 
                Price="5" 
                PartIDREF="Part2" />
   </Invoice>
   <Customer CustomerID="Customer2" 
             Name="BobSmith" 
             Address="2AnyStreet" 
             City="Anytown" 
             State="AS" 
             PostalCode="ANYCODE" />
   <Part PartID="Part2" 
         PartNumber="13" 
         Name="Winkle" 
         Color="Red" 
         Size="10" />
   <MonthlyTotal Month="January" 
                 Year="2000" 
                 VolumeShipped="2" 
                 PriceShipped="10">
      <MonthlyCustomerTotal VolumeShipped="5" 
                            PriceShipped="25"
                            CustomerIDREF="Customer2" />
      <MonthlyPartTotal VolumeShipped="8" 
                        PriceShipped="40" 
                        PartIDREF="Part2" />
   </MonthlyTotal>
</SalesData>

Contents

To page 1current pageTo page 3
[previous] [next]


Created: June 14, 2001
Revised: June 14, 2001

URL: http://webreference.com/authoring/languages/xml/databases/chap2/4/2.html