From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Fri Jan 14 2000 - 06:22:23 EST
On Tue, Oct 16, 2007 at 01:13:36PM +0200, Andrea LUCIANO wrote:
> xmlEntityEncode doesn't seem to encode the character "&".
> Is that the correct result?
> I was expecting "&" to be converted into an xml entity like other characters (quotation marks, ecc.).
>
> Best regards.
> Andrea
>
> P.S. I refer to libxml 1.7.2 in the question
I suggest:
- you upgrade, libxml-1.8.4 is out and I did change things in the
entities support in the meantime
- that your use xmlEncodeEntitiesReentrant and not xmlEncodeEntities
which is deprecated since not reentrant
I'm surprised since xmlEncodeEntitiesReentrant() code shows the following:
} else if (*cur == '&') {
*out++ = '&';
*out++ = 'a';
*out++ = 'm';
*out++ = 'p';
*out++ = ';';
How was the '&' passed to xml when read from file, or when built using the
API ? In taht case, which function ? It's hard to help by lack of context,
but check with an updated lib first so taht we talk about the same codebase.
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe ---- Message from the list xml@xmlsoft.org Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@xmlsoft.org
This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:58 EDT