Maarten Coene wrote:
DOMDocumentFactory factory = new DOMDocumentFactory();
SAXReader reader = new SAXReader(factory);
InputStream in = [...] // your XML file for instance
org.dom4j.Document dom4jDoc = reader.read(in);
org.w3c.dom.Document w3cDoc = (org.w3c.dom.Document) dom4jDoc;

Did you mean to use the factory on the last line? We can't simply cast a Dom4J Document into a w3c Document, right?

Ben


PS: sent this at first from the wrong address... apologies if it shows up twice.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to