Thanks for reading my post. I'm working on a project which involves a significant amount of XML message parsing and routing. I'm planning to use JAXB for XML marshaling/unmarshaling. Please note that this project does not involve web services. I'm using JAXB for marshaling/unmarshaling of XML. I realize that there is very limited amount of documentation when it come to this topic. I found this tutorial at javabeat extremely useful as this is what I'm exactly going to do.
But I've hit a rough patch due to the way the XML messages are formed. I tried to change the message format but it seems it is impossible as what I'm working on is one single component of an existing component chain . This is my background. My problem is:
The messages received by my component are of the following format:
The message contains multiple counts of <MSG> tags. And the first <MSG> tag represents a batch header which describes elements common to the rest of the <MSG> elements. I have a object hierarchy which implements the above structure. But I'm stuck when it comes to describing JAXB that the first element is the header and the rest are messages, simply because the base element name is <MSG> for both of them.
You help, comments, ideas will be most helpful. Thanks in advance.
No Winds No Waves
Get me the mayor's office! I need to tell her about this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library