|
|
 |
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 |