Hi,
For my part, sometimes I use the DOMBuilder which I serialize with XMLUtils.serializeNode() to get a String.
I also have created a transformer which get a W3C DOM from a database.
Here is a sample, It may be useful :
/** Create the resulting Document */ Document docResult = DOMUtil.createDocument();
/** Append a Root element */
docResult.appendChild(docResult.createElement("list"));/** Get result as a W3C Document */ Document currentDoc = "A custom Method returning the document.
/** Remove the body of the document */
currentDoc.getDocumentElement().getLastChild().getParentNode().removeChild(currentDoc.getDocumentElement().getLastChild());
/** log information */ getLogger().info(XMLUtils.serializeNodeToXML(currentDoc.getDocumentElement()));
/** Stream the DOM. It will be send once */
DOMStreamer s = new DOMStreamer(this.contentHandler, this.lexicalHandler);
/** Stream the DOM to the pipe */ s.stream(currentDoc.getDocumentElement());
Why don't you use the "xslt" transformer to transformer your document ?
Lionel
Reuben Christie wrote:
Hi all, I have written a cocoon trasformer in which i am performing xslt transformation using javax.xml.transform.Transformer(i know people would suggest me to use xslt transformer from cocoon but i have to do it this way cuz of lots of other issues).now transform method would result in having DOMResult object, i want to convert this DOMResult object into Document object so that i can return it back to the pipeline for further processing. i tried getNode() method of DOMResult to give me Node and then getOwnerDocument() on Node but it doesnt work . any other ideas ? Thank you Reuben
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Lionel CRINE Ing�nieur Syst�mes Documentaires Soci�t� : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.46.06.90
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
