Edwin Dankert wrote:
Yes, that constructor does not seem to be very intuitive.

To get around this problem you could try the following code:
...
DocumentFactory factory = DocumentFactory.getInstance();
Document doc = factory.createDocument( element.createCopy());
DocumentSource source = new DocumentSource( doc);
...

That is what I have been doing. But I have wondered if it could be less expensive if the Source can come from the node rather than converting it to a Document (but not posted about it because it has not /appeared/ that expensive). Perhaps the node can be sent out as SAX events to the transform?


best,
-Rob



Regards, Edwin


------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user




------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to