I have a problem when I try converter a document (org.w3c.dom.Document) to String for GWT.
Bofer I developed it without to use GWT and I make like this:
XMLSerializer xmlSerializer = new XMLSerializer();
StringWriter strWriter = new StringWriter();
OutputFormat outFormat1 = new OutputFormat();
outFormat1.setEncoding("UTF-8");
//outFormat1.setEncoding("ISO-8859-1");
outFormat1.setVersion("1.0");
outFormat1.setIndenting(true);
outFormat1.setIndent(4);
//outFormat1.setIndent(2);
outFormat1.setOmitXMLDeclaration(false);
outFormat1.setMethod("xml");
xmlSerializer.setOutputCharStream(strWriter);
xmlSerializer.setOutputFormat(outFormat1);
xmlSerializer.serialize(xmlDoc);
strWriter.close();
But the application give a mistake because GWT don´t accept it.
Do someone know some other solution?
Thanks.