DOMSource domSource = new DOMSource(document); //org.w3c.dom.Document document = null;
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tranFact = TransformerFactory.newInstance();
Transformer transfor = tranFact.newTransformer();
transfor.transform(domSource, result);
String returnXML=writer.toString();
Sunday, May 22, 2011
Document to String
Add CDATA in JavaScript
var newCdata=dataXmlDom.createCDATASection("data to append");
newContextElem.appendChild(newCdata);
Subscribe to:
Posts (Atom)