Hi,
I hav to change an entity in an existing xml File therefore I have to read the XML Encoding from the source File so that I can set it for writing the file.
As far as I understand it, the following code (shortened version) should work, but I always get 'null' back from getXMLEncoding()
import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.io.SAXReader;
String sourceEncoding; Document doc;
SAXReader reader = new SAXReader(); try { doc = reader.read(this.inFile); sourceEncoding = doc.getXMLEncoding()); } catch (DocumentException e) { ... }
Has anybody an idea what's wrong here? Thank you in advance.
Regards, Volker
------------------------------------------------------- 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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user