Hello,
I recently received a project involving XML and could use some guidance since my understanding of XML is very basic. The full requirements of the project are unknown at this time though I do have enough information to start prototyping.
I am looking for any pointers or guidance that you may provide that will put me on the right track, since I don�t have a lot of time to educate myself with how
Java and XML work together.
Project description:
On a daily basis an XML service sheet and various court documents are received in a folder. The service sheet will contain the names of the court documents and other info pertaining to each court document.
My Java program will load the XML file and parse it to assure it is well-formed. Once this check passes, the application will iterate through the parsed document and verify that every document specified in the XML file is in fact stored in the folder.
The contents of the XML service sheet will look something like the following, though the exact contents of the file are unknown at this time. I do know there will be a filename attribute for each document type.
<xml>
<petitions>
<petition>
<filename>petition1.pdf</filename>
<number>1412-08</number>
<taxpayer>Fred B. Miller</taxpayer>
<filingdate>08/12/2008</filingdate>
</petition>
<petition>
<filename>petition2.pdf</filename>
<number>1413-08</number>
<taxpayer>Phil D. Bloughman</taxpayer>
<filingdate>08/12/2008</filingdate>
</petition>
<petition>
<filename>petition3.pdf</filename>
<number>1414-08</number>
<taxpayer>Acme International Corporation</taxpayer>
<filingdate>08/12/2008</filingdate>
</petition>
</petitions>
<calendars>
<calendar>
<filename>calendar1.pdf</filename>
<judge>Judy M. Hatchett</judge>
<location>Philadelphia</location>
</calendar>
<calendar>
<filename>calendar2.pdf</filename>
<judge>Betty V. Hosenberry</judge>
<location>Boston</location>
</calendar>
</calendars>
<orders>
<order>
<filename>order1.pdf</filename>
<number>1056-08</number>
<taxpayer>Barney J. Smith</taxpayer>
<issueddate>08/12/2008</issueddate>
</order>
<order>
<filename>order2.pdf</filename>
<number>1334-08</number>
<taxpayer>XYZ Corporation</taxpayer>
<issueddate>08/12/2008</issueddate>
</order>
<order>
<filename>order3.pdf</filename>
<number>1401-08</number>
<taxpayer>Lou H. Reed</taxpayer>
<issueddate>08/12/2008</issueddate>
</order>
</orders>
</xml>
Ideally I am looking for guidance on the Java API�s that:
1. Determine if a document is well formed
2. Can parse/retrieve the filename attribute for all occurrences in the XML file
All help is greatly appreciated
Thanks Jim