Re: RE : [xml] Parsing invalid characters or entities ref

On Wed, Nov 05, 2003 at 11:42:15AM +0100, Morus Walter wrote:
Daniel Veillard writes:
On Wed, Nov 05, 2003 at 11:11:37AM +0100, GARNIER Pierre wrote:
In fact I was asking myself about the opportuneness to give the possibility
in the apis (as an option) to replace invalid characters - where it is
possible - by a given replacement character and so to continue parsing.

  Well, clearly this violates the behaviour stated by the XML spec.
So I don't think it's proper to add this for any kind of general processing.

Couldn't he just use the io layer to do some prefiltering?
That would remove the problem before the parser sees it.

  or the encoding layer, yes that would be 2 possibilities. But in the
face of broken XML the right thing to do 99% of the time it to yell
at whoever provided something broken so that they fix the problem on
their side.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]