Document Type Declaration

   



A Complete XML Document

The following sample XML document brings all these concepts together. It contains a document type declaration, an internal DTD specification, and then the actual data contents of the document:

<?xml version="1.0" standalone="yes" encoding="UTF-8"?> <!  ---   A Book order in XML format  -- > <!DOCTYPE Order [ <!ELEMENT Order (LineItem)+> <!ATTLIST Order orderNumber CDATA #REQUIRED> <!ELEMENT LineItem (Title, Author+, BookType, Price)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Author (#PCDATA)> <!ELEMENT BookType (#PCDATA)> <!ELEMENT Price (#PCDATA)> <!ENTITY HARDCOVER "Hardcover"> <!ENTITY PAPERBACK "Paperback"> ]> <Order orderNumber="81332713233407"> <LineItem> <Title>Debt of Honor</Title> <Author>Tom Clancy</Author> <BookType>&PAPERBACK;</BookType> <Price>$6.99</Price> </LineItem> <LineItem> <Title>The Hunt for Red October</Title> <Author>Tom Clancy</Author> <BookType>&HARDCOVER;</BookType> <Price>$18.99</Price> </LineItem> </Order>



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

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