Hi Friends,
I am receiving an XML from external system which I have to parse using JAXB.
Now I am the one who will be creating the schema out of the sample XML given.
Here is what it looks like:
<?xml version="1.0"?>
<Org>
<Emp Number="137137">
<Name>Chintan</Name>
<LastName>Desai</LastName>
</Emp>
<Emp Number="118939">
<Name>Chintan</Name>
<LastName>Desai</LastName>
<Name>Jabeen</Name>
<LastName>Mohmd</LastName>
</Emp>
</Org>
I am not sure if the generated JAXB objects will be able to handle the scenario as in the second Emp Node, I am having multiple nodes for Name and LastName and I am not sure how to distinguish between them.
I do not want to parse Sequentially (No SAX parser to be used - as my incoming XML can be as huge as 1MB to 5MB).
My question here is, Can I ask the external system to provide me a more uniform XML??
Please let me know your views on this.
Chintan