25APR2000 XMLTalk

A Peek at XML Syntax

  • XML syntax is simple:
  • <tagName attributeName="value"> data </tagName>
  • In practice one might have:
  • <Auto Make="Ford" Model="Mustang" Year="1964" Color="Blue" Type="Convertible" > The car is in good condition with 120,000 miles...</Auto>
  • Look and feel of HTML but the tags names are different
  • DTD syntax fairly simple:
  • <!ELEMENT tagName childList>
    <!ATTLIST tagName
        attributeName1 type constraint1
        attributeName2 type2 constraint2>
  • In the auto example we might have:
  • <!ELEMENT Auto (#PCDATA)>
    <!ATTLIST Auto
        Make CDATA #REQUIRED
        Model CDATA #REQUIRED
        Year CDATA #REQUIRED
        Color CDATA #REQUIRED
        Type CDATA #OPTIONAL>

    Previous
    Outline
    Next Page
    gug@fnal.gov
    Page 3