Re: [xml] xmlEncodeSpecialChars problem
- From: Daniel Veillard <veillard redhat com>
- To: oliverst online de
- Cc: xml gnome org
- Subject: Re: [xml] xmlEncodeSpecialChars problem
- Date: Thu, 20 Apr 2006 07:59:51 -0400
On Thu, Apr 20, 2006 at 01:44:28PM +0200, oliverst online de wrote:
I have a problem, that I changed from my own encoding function to xmlEncodeEntitiesReentrant and suddenly
apostrophs (') appeared in my attributes. So I tried xmlEncodeSpecialChars and they still were present.
Same problem with the quotes ("), but then found out xmlEncodeSpecialChars does that. But now I have the
problem, that nothing works anymore, because the apostroph still isn't encoded. Judging from the function
descrption I assume, but both should be the same (differing in the encoding of quote (")) and should encode
*all* the problematic characters, which (') is one of. Is there a reason, why it isn't concerted?
Because it's usually not needed. libxml2 serialization functions know
how to handle ' and " in attribute functions:
paphio:~ -> cat tst.xml
<foo bar="'" bar2='"'> a " b ' c </foo>
paphio:~ -> xmllint tst.xml
<?xml version="1.0"?>
<foo bar="'" bar2="""> a " b ' c </foo>
paphio:~ ->
There is something else broken
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]