From: Daniel Veillard (Daniel.Veillard@imag.fr)
Date: Fri Jan 19 2001 - 15:04:21 EST
On Fri, Jan 19, 2001 at 11:56:21AM -0800, Alice Tull wrote:
>
>
> Yes, that's what the tester returned, but no, that's not my
> question. I guess what I mean is, if I wrote "\n" in
> my xml file, I really mean this string only has one
> character, i.e. string[0] = '\n'. What libxml does (did?)
> was to treat that as 2 characters, '\\" and 'n', that's
> confirmed if you use xmlGetProp and inspect on the
> char * that was returned, if you just print the string,
> you'll get "\n", but that string will now have 2 characters.
>
> So, is that the correct behavior?
It is, XML is not C, and attributes as well as the rest of
an XML file are subject to character normalisation at parsing time.
Get a book on XML (sorry no specific suggestion) to familiarize
yourself with those topics. Or read the spec
or Tim Bray's annotated version
http://www.xml.com/axml/axml.html
If want to keep them in attributes use and
Daniel
-- Daniel Veillard | Red Hat Network http://redhat.com/products/network/ veillard@redhat.com | libxml Gnome XML toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Fri Jan 19 2001 - 16:43:42 EST