Conceptual XML loading question

Questions about XML that are not covered by the other forums should go here.
innovativeaj
Posts: 1
Joined: Wed Jun 13, 2012 11:10 pm

Conceptual XML loading question

Post by innovativeaj »

First, thanks in advance to all readers and responders.

I will begin receiving XML files on a monthly basis from a 3rd party vendor that will vary in attributes and length, though all based on the same XSD. My task is to attempt and create a single process that imports these files without user intervention, even though the files will vary.

Is such a concept possible?

To illustrate, I could have one file with the following (for argument sake, this is only one record, but the file would have hundreds) :

<statement>
<billingaddress>
<line1>1234 Elm St</line1>
<city>Dallas</city>
</billingaddress>
</statement>

Then, in the next file, a billing address has more elements and there is also a mailing address:

<statement>
<billingaddress>
<line1>1234 Joe St</line1>
<city>Austin</city>
<state>TX</state>
<zip>78723</zip>
</billingaddress>
<mailingaddress>
<line1>1111 Test St</line1>
<city>Austin</city>
<state>TX</state>
<zip>78723</zip>
</mailingaddress>
</statement>

As I mentioned, the XSD has not changed and specifies all of the above attributes from both files. Thus, my question is, is it possible to create a single routine to extract both addresses from both files, even though the first file does not have a mailing address and lacks all of the elements specified on the XSD?

Let me know if further clarification is required.
William
Posts: 42
Joined: Sun Jul 15, 2012 12:26 pm
Location: London

Re: Conceptual XML loading question

Post by William »

Hi.

You don't say what or how this process will be hosted so maybe with a bit more information you may well get more replies.

But for what its worth I'd do this in Java and use my own Content Handler.

--
William
Post Reply