943,774 Members | Top Members by Rank

Ad:
Mar 25th, 2009
0

Encoding retrieval with Xalan

Expand Post »
Hello, everyone!

I am using Xalan to parse a XML document. This is a glimpse of what I do:

XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. std::string fileNameStr = fileName.Tofilename();
  2. XalanDOMString strFileName(fileNameStr.c_str());
  3.  
  4. LocalFileInputSource srcFile(strFileName.c_str());
  5.  
  6. XalanDocument* document = parserLiaison.parseXMLStream(srcFile);

What I want to do is to know the encoding of the source document. There is no method on a XalanDocument or on a parser that tells the encoding. Is there someone who knows how to do it? I will greatly appreciate a solution!
Reputation Points: 72
Solved Threads: 26
Posting Whiz in Training
GDICommander is offline Offline
209 posts
since Jun 2008
Mar 26th, 2009
0

Re: Encoding retrieval with Xalan

Never mind, I used a XercesDOMParser, I retrieved a DOMDocument and I called getEncoding() on that object.

If someone knows the answer of my initial question, it will be good to answer for other developers who need Xalan.
Reputation Points: 72
Solved Threads: 26
Posting Whiz in Training
GDICommander is offline Offline
209 posts
since Jun 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in XML, XSLT and XPATH Forum Timeline: Help getting started with a XML web service using PHP
Next Thread in XML, XSLT and XPATH Forum Timeline: SQL formatting problems with XML





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC