The annotation associated with an XML document determines through attributes how the individual elements are to be displayed.

COMPONENT JAVA
X4Dialog: Help for Dynamic Web Sites
Oliver Brüning
Listing 4. The annotation associated with an XML document determines through attributes how the individual elements are to be displayed.


<?xml version=”1.0”?>
<root>
  <address>
    <name label="Name" type="input"/>
    <fname label="First Name" type="input"/>
    <street label="Street" type="input"/>
    <city label="City" type="input"/>
    <state label="State" type="select">
       <select>
         <option>-- Choose State --</option>
         <option>Alabama</option>
         <option>Alaska</option>
         <option>Alberta</option>
         <option>Arizona</option>
         <option>New York</option>
         <option>Texas</option>
       </select>
    </state>
    <readerofjavareport label="Reader of JavaReport" type="checkbox"/>
    <pet label="Favorite Pet" type="input"/>
  </address>
</root>