Encoding retrieval with Xalan

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2008
Posts: 147
Reputation: GDICommander is an unknown quantity at this point 
Solved Threads: 19
GDICommander's Avatar
GDICommander GDICommander is offline Offline
Junior Poster

Encoding retrieval with Xalan

 
0
  #1
Mar 25th, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 147
Reputation: GDICommander is an unknown quantity at this point 
Solved Threads: 19
GDICommander's Avatar
GDICommander GDICommander is offline Offline
Junior Poster

Re: Encoding retrieval with Xalan

 
0
  #2
Mar 26th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the XML, XSLT and XPATH Forum


Views: 438 | Replies: 1
Thread Tools Search this Thread



Tag cloud for XML, XSLT and XPATH
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC