This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use Java to parse C# serialized XML

 
Peter Hsu
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have 2 classes. One written in Java, one Written in C#. Their structure should mirror one another. The C# object is serialize to an XML file using XMLSerializer. I want to be able to deserialize the XML into a Java object of the class written in Java. What is the best way to do it? Using DOM? JAXB? or is there a tool designed specifically for this purpose?

thanks

Peter
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you pass it as a SOAP message?
 
Peter Hsu
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the serialized object is saved in database. The Java program only go in the database to obtain that object when it needs it.

If the requirement is real time invocation I would have used SOAP for sure.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic