You might have to specify the charEncoding for the <c:import> because it might be defaulting to ISO-8859-1.
Try this:
<c:import url="test.xml" var="xfile" charEncoding="UTF-8" />
Siddharth wrote:
Hi,
I am trying to parse a xml file with a non-english Unicode content using jstl's xml tag. But I get the error, "Content not allowed in Prolog". I tried to parse the same xml with other parsers like msxml, jaxp and it works fine. I can even print the textual form of the xml using <c:out>. Where am I going wrong? Is there something I should do before parsing Unicode xml files?
This is the sample xml file, test.xml :
<?xml version="1.0" encoding="UTF-8"?> <root> வேர் </root>
and the JSTL code was,
<c:import url="test.xml" var="xfile"/> <x:parse xml="${xfile}" var="xdoc"/> <x:out select="$xdoc/root"/>
Thanx for the attention.
Siddharth.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jason Lea
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
