From: Alice Tull (tull@narus.com)
Date: Fri Jan 19 2001 - 14:56:21 EST
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?
thanx,
alice
-----Original Message-----
From: Daniel Veillard [mailto:Daniel.Veillard@imag.fr]
Sent: Friday, January 19, 2001 1:53 AM
To: xml@rpmfind.net
Subject: Re: [xml] problem with xmlGetProp
On Fri, Jan 19, 2001 at 12:30:19AM -0800, Alice Tull wrote:
>
> Hi,
>
> I'm using 1.8.7 and encountered the following problem:
>
> One of my elements has an attribute that takes a string:
>
> <Field separator = "\n" />
>
> When I use xmlGetProp to get the value for separator,
> it returned "\\n". Is that correct behavior?
No, please double check (I bet you got confused) because I
can't reproduce it with either 1.8.11 nor 1.2.11:
orchis:/gnome/src/gnome-xml.old -> cat tst.xml
<Field separator = "\n" />
orchis:/gnome/src/gnome-xml.old -> ./tester tst.xml
<?xml version="1.0"?>
<Field separator="\n"/>
orchis:/gnome/src/gnome-xml.old -> ../gnome-xml/xmllint tst.xml
<?xml version="1.0"?>
<Field separator="\n"/>
orchis:/gnome/src/gnome-xml.old ->
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 ---- 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