This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert xml to Java String

 
Shankar sanjay
Ranch Hand
Posts: 117
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am having the following xml document (sample)



I want to create each EmpDetails as String of xml format, how to convert? for sample i want to convert to java String.(name space has to be included)


any idea?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind. My mistake.
 
Paul Clapham
Sheriff
Pie
Posts: 20185
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would load the document into a DOM, and then for each element for which you want to output a String, use an identity XSL transformation to transform it into a String.

Or did you already have that idea but you had a problem with some particular part of it? If so, asking about that particular part would have been more practical.
 
Shankar sanjay
Ranch Hand
Posts: 117
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking some idea or some sample code, the problem is extracting with name space
 
Paul Clapham
Sheriff
Pie
Posts: 20185
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was an idea. You can get sample code from the tutorials.

And no, the namespaces are not a problem. Why do you say that is "the" problem?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic