Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing different types of XML..

Status
Not open for further replies.

niet72

Programmer
Jul 17, 2008
7
US
Hi,
I have a XML structure that looks like this:
<TRANSACTION TYPE="A">
</TRANSACTION>

Now, inside this XML structure, there can be different types of XMLs that can be embedded in,that have different Schema definitions and The Transaction TYPE would determine what type of XML is in it.

I am trying to find, what is the best way to parse such an XML, given the only way to detemine the type is using the TYPE attribute and then associating the right XML schema..

niet..
 
I think "parse" is a too vague term. Could you give more details about what you're trying to do?

Cheers,
Dian
 
Well,
I am using JAXB, so the ultimate goal is to processes the data coming in this XML..
Not sure what specfic information you're looking for?

neit..
 
Do you mean you want to be able to mix-and-match schemas within a single XML document, based on the value of the TYPE attribute of the TRANSACTION tag?
 
yes that is correct. So inside the TRANSACTION tag, I can get an XML Structure of TYPE A,B or C, and each one has to be validated with its corresponding Schema..and then processed..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top