You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by IndianAtTech <in...@gmail.com> on 2004/11/16 08:07:38 UTC
Node to String
Hello All,
I can know hoe to convert Document to string using following method
public String domToString(Document doc) {
try {
StringWriter sw = new StringWriter();
OutputFormat output = new OutputFormat("text", "ISO-8859-1", true);
output.setPreserveSpace(true);
XMLSerializer serial = new XMLSerializer(sw, output);
serial.serialize(doc);
return sw.toString();
}
catch (IOException e) {
e.printStackTrace();
return null;
}
But I would like to know the method for convering Node to String.
please help me
thanks
Sudhakar
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org