Hi Tony,

The original encoding of the source document is not part of the XPath data
model, so it is not available.  Since the SAX API does not report this
information, it's impossible for Xalan-C to recover and store this
information, even if we wanted to.

Dave



|---------+--------------------------->
|         |           "Tony Palmer"   |
|         |           <[EMAIL PROTECTED]|
|         |           >               |
|         |                           |
|         |           03/19/2004 09:03|
|         |           AM              |
|         |           Please respond  |
|         |           to xalan-dev    |
|---------+--------------------------->
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                                              |
  |        To:      <[EMAIL PROTECTED]>                                                
                                                       |
  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                               
                                                              |
  |        Subject: XML encoding                                                       
                                                              |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|



Hi,
I need to obtain the xml encoding from the underlying document after is is
parsed.
I note that the Xerces DOMDocumentImpl has the methods
     virtual const XMLCh*         getEncoding() const;
     virtual const XMLCh*         getActualEncoding() const;

Looking at files in  XalanDOM, XercesParserLiaison and XalanSourceTree
there appears to be no way to obtain this using the Xalan document. I'm
assuming that there might be no encoding attribute in the xml-decl and that
the encoding could be obtained just from the bom and not defaulted to
UTF-8.
How can I obtain the endoding (via Xalan)?
I am using  the excellent Xalan-C_1_6_0 and xerces-c_2_3_0
Many regards,
Tony

Reply via email to