Hello, everyone!

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

std::string fileNameStr = fileName.Tofilename();
	XalanDOMString strFileName(fileNameStr.c_str());
	
	LocalFileInputSource srcFile(strFileName.c_str());

	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!

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.