Listing 129 XML document containing data for the Field Service Application

<?xml version="1.0" encoding="UTF-8" ?>

<joblist>

<status>OPEN</status>

<customer>Big Tristan's Imports</customer>

<address>2200 East Cedar Ave</address>

<city>Flagstaff</city>

<produc t >Unwi redTools UTCIS-PT</produc t >

<producturl>http://unwiredtools.com</producturl>

<comments>Requires tuning - too rich in the mid range RPM.

Download software from website before visiting.</comments>

Now that you have a feel for what the job data looks like, you need to see how the data is handled in our Java classes.

The individual job is used throughout the application and is therefore essential to understand. In our application, we define the JobEntry class to manage the individual

<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT joblist ((job+))>

<!ELEMENT job ((id, status, customer, address, city, state, zip, product

<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT joblist ((job+))>

<!ELEMENT job ((id, status, customer, address, city, state, zip, product

<!ELEMENT status (#PCDATA)> <!ELEMENT state (#PCDATA)> <!ELEMENT producturl (#PCDATA)> <!ELEMENT product (#PCDATA)> <!ELEMENT id (#PCDATA)> <!ELEMENT customer (#PCDATA)> <!ELEMENT comments (#PCDATA)> <!ELEMENT city (#PCDATA)> <!ELEMENT address (#PCDATA)>

JOBENTRY

job, shown in listing 12.10. Note that many of the lines are omitted from this listing for brevity; please see the available source code for the complete code listing.

0 0

Post a comment