Defining Data in XML Form

The XML document for the "Person Context Panel Widget" widget is a combination of the XML documents used by the photograph and details widgets described in previous chapters, but combined in a new root element. This will allow each of those renderers to be re-used.

Figure 1. An XML Document Describing a Person
<person>
  <photo>
    <name>James Smith</name>
    <id>24684</id>
  </photo>

  <details>
    <name>James Smith</name>
    <reference>24684</reference>
    <address>1074, Park Terrace, Fairfield,
    Midway, Utah, 12345</address>
    <gender>Male</gender>
    <dob>9/26/1964</dob>
    <age>46</age>
    <phone>1 555 3477455</phone>
    <e-mail>james@ie.ibm.com</e-mail>
  </details>
</person>