Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please suggest an option to parse a XML  RSS feed

 
Shanmu Arumugam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!