home *** CD-ROM | disk | FTP | other *** search
/ Keystone Learning XML: Entities & Basic Scripting / Keystone Learning XML Entities and Basic Scripting.iso / Sample Files / Chapter 5 / Employees_NotWellFormed.xml next >
Encoding:
Extensible Markup Language  |  1999-12-08  |  1.5 KB  |  66 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE employes [
  3.     <!ELEMENT employees ( employee+ )>
  4.  
  5.     <!ELEMENT employee 
  6.         (name position, address, phone)>
  7.     <!ATTLIST employee id ID>
  8.  
  9.     <!ELEMENT name (first, last)>
  10.     <!ELEMENT first (#PCDATA)>
  11.     <!ELEMENT last  (#PCDATA)>
  12.  
  13.     <!ELEMENT position (#PCDATA)>
  14.  
  15.     <!ELEMENT address 
  16.         (street?, city?, state?, zip?)>
  17.     <!ELEMENT street (#PCDATA)>
  18.     <!ELEMENT city   (#PCDATA)>
  19.     <!ELEMENT state  (#PCDATA)>
  20.     <!ELEMENT zip    (#PCDATA)>
  21.  
  22.     <!ELEMENT phone (main, office*, fax*, mobile*, home*)>
  23.     <!ELEMENT main   (#PCDATA)>
  24.     <!ELEMENT office (#PCDATA)>
  25.     <!ELEMENT fax    (#PCDATA)>
  26.     <!ELEMENT mobile (#PCDATA)>
  27.     <!ELEMENT home   (#PCDATA)>
  28. ]>
  29.  
  30. <employees>
  31.  
  32.     <employee id=A1234>
  33.         <name>
  34.             <first>John</first>
  35.             <last>Doe</last>
  36.         </name>
  37.         <position>Programmer</position>
  38.         <address>
  39.             <street>123 Main Street</street>
  40.             <city>Anywhere</city>
  41.             <state>CA</state>
  42.             <zip>92000</zip>
  43.         </address>
  44.         <phone>
  45.             <main>(714) 555-1000</main>
  46.             <fax>(714) 555-1001</fax>
  47.         </phone>
  48.     </employee>
  49.  
  50.     <employee id="A2345">
  51.         <name>
  52.             <first>Jane</first>
  53.             <last>Doe</last>
  54.         </name>
  55.         <position>Systems Analyst</position>
  56.         <address>
  57.         </address>
  58.         <phone>
  59.             <main>(714) 555-2000<main>
  60.             <mobile>(949) 555-2200</mobile>
  61.             <home>(949) 555-2220</home>
  62.         </phone>
  63.     </employee>
  64.  
  65. </employees>
  66.