|
From: | Markus Skistad |
Subject: | Re: [Qexo-general] Strange special character problem |
Date: | Tue, 14 Feb 2006 08:47:26 +0100 |
Markus Skistad wrote:
> I'm using kawa-1.8 against a ISO-8859-1 xml document.
Without a testcase I can't tell if the problem is the the XMLPrinter
(as you hypothesize), but I actually suspect the XML parser.
Kawa's builtin XML parser is rather basic. It doesn't handle
byte->character handling, but uses the standard Java Reader support.
It specifically does not handle encoding declarations.
Of course one could fix the Kawa XML parser to be more conformant.
but I don't think that makes sense. Better to switch to using a
more conformant XML parser - specifically a parser conformant to
JAXP. Since JDK 1.4 comes with a standard XML parser, we should
use that, when available.
The existing Kawa parser is useful as an option, when JAXP isn't
available or when one needs a quick and dirty XML parser. There
should be a way to select a parser, but the default should be
the JAXP parser when it is available.
This would also give us the option of validation.
I'm not very familiar with JAXP and I haven't had time to spend
on this so far. A volunteer to look into this would be appreciated.
--
--Per Bothner
address@hidden http://per.bothner.com/
[Prev in Thread] | Current Thread | [Next in Thread] |