According to the getXMLEncoding() javadoc:
Return the encoding of this document, as part of the XML declaration This is
null
when unspecified or when it is not known (such as when the Document was created in memory) or when the implementation does not support this operation. If I take a look at your example, you create the document in memory, so this is the reason why you get null.
regards,
Maarten
Ziad EL KHATIB <[EMAIL PROTECTED]> wrote:
done but still null :-(
On 12/23/05, Edwin Dankert <[EMAIL PROTECTED]>wrote:
> You'll have to make sure to use the correct XML Parser.
>
> Try specifying your SAX Parser using the following if you're using JDK 5.0:
>
& gt; System.setProperty( "org.xml.sax.driver",
> "com.sun.org.apache.xerces.internal.parsers.SAXParser");
>
> Otherwise, if you're not using JDK 5.0, try to download Xerces, add it
> to your classpath and use the following:
>
> System.setProperty( "org.xml.sax.driver",
> "org.apache.xerces.parsers.SAXParser");
>
> Regards,
> Edwin
> --
> http://www.edankert.com/
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping