aspose file tools*
The moose likes XML and Related Technologies and the fly likes Please suggest an option to parse a XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Please suggest an option to parse a XML" Watch "Please suggest an option to parse a XML" New topic
Author

Please suggest an option to parse a XML

Shanmu Arumugam
Greenhorn

Joined: Mar 22, 2006
Posts: 14
Hi,

Could anyone please suggest me a best option for my requirement.

Here is my requirement.

I'll get an XML from MQ and I need to parse and insert the data into my SQL Server. I've got XSD for that XML. I thought of using JAXB. i'm bit confused. I already compiled the XSD and generated content objects and placed under my project folder. But, how to get/set values whenever I get a new message (XML) from MQ?

Much appreciated your help.

Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18887
    
    8

Shanmu Arumugam wrote:I thought of using JAXB. i'm bit confused.


Then are you asking for a JAXB tutorial? The rest of your question suggests you can't write the basic code to make JAXB turn that XML document into Java objects. At least I think it does... I don't know what the reference to "get/set values" means.

Or are you asking whether you should use JAXB or something else?
Shanmu Arumugam
Greenhorn

Joined: Mar 22, 2006
Posts: 14
Thanks . Actually I got it what I wanted.

i misunderstood that whenever I get a xml from MQ I need to compile it using -XJC. I realized that I just need to unmarshal it.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please suggest an option to parse a XML