Re: [xml] Decoding in attributes broken for libxml2-2.6.2

On Mon, Nov 24, 2003 at 05:38:24PM +0100, Marc Ewert wrote:

I have a simple test-xml:

<?xml version="1.0" encoding="UTF-8"?>
<Document uri="http://local/?a=1&amp;b=2"; />

with an encoded ampersand in an attribute.

  SAX sucks w.r.t. handling of entities in attributes.
Libxml2 need to be able to edit entities in atributes, by default
it tries to preserve them. This generate this kind of mess.
You have 2 solutions:
  - don't use SAX
  - ask the parser to replace entities values, in that case 
    the substitution will already be done before the callback level.


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]