Re: [xml] xmlParseChunk and quotes



On Fri, Aug 16, 2013 at 4:47 PM, j j  wrote:

Hi

I'm using xmlParseChunk function to parse the following xml
fragment. xmlParseChunk takes is as input.

... <car color="id=&quot;43&quot;"> ...

the resulting attribute is as follows:
color="id"43""

How can I force xmlParseChunk not to encode &quot; as " and leave it intact. I
would expect the following resulting attribute:

color="id=&quot;43&quot;"


Hi j j,
When your XML contains   color="id=&quot;43&quot;"
then the name of the attribute is "color" and the value of the
attribute is the following seven characters.

i d = " 4 3 "

Since this is now a C string, not XML source, you get the value that
&quot; represents, i.e. a double-quote character. It is
xmlParseChunk's job to make this transformation.

Csaba

-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds


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