• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please suggest an option to parse a XML

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic