This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes String from Document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "String from Document" Watch "String from Document" New topic

String from Document

Pavel Kubal
Ranch Hand

Joined: Mar 13, 2004
Posts: 356
Hi, how can I get string representation of Document object? I mean XML document.
Amit G Piplani
Ranch Hand

Joined: Jul 21, 2004
Posts: 83
Try this :
Element reqMsg = doc.getDocumentElement();
System.out.println( "Request Message = " + org.apache.soap.util.xml.DOM2Writer.nodeToString(reqMsg ) );

I agree. Here's the link:
subject: String from Document
It's not a secret anymore!