This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes Converting String to an XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Converting String to an XML" Watch "Converting String to an XML" New topic
Author

Converting String to an XML

Shruti Sharma
Ranch Hand

Joined: Mar 25, 2010
Posts: 55
Hi,

Can someone please tell how to convert a String to an XML document. The converted XML should confirm to the given XSD. Is there any sample code that I can refer to?

Thank you,
-Shruti
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

So if I have a String like this:

you are looking for pre-written code which will convert that into XML based on an arbitrary schema?

I expect your actual requirements differ from that somewhat. Hopefully with more detail. Would you like to clarify?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Converting String to an XML