From: ming lu (lu542@home.com)
Date: Sat Feb 10 2001 - 21:44:36 EST
Thank you very much for your reply. But after I changed it to element. I
found the string I got from
xmlNodeListGetString changed 0D0A (return for dos) to 0A0A. Anyway to get
0D0A instead? Thank you again for your help!
> Hum, that's an interesting point.
> Basically XML parser have to do attribute normalization, and this include
> replacing newlines by blanks.
> http://www.w3.org/TR/REC-xml#AVNormalize
>
> However when passed as numeric character reference in the serialization
> (like 
 ) then the normalization doesn't apply, but currently libxml
> doesn't check for extra spaces or newlines in attribute content when
> saving, i.e. it doesn't escape them as character reference and then at
next
> parsing they would disapear anyway :-\, it's in the TODO but I never
> took the time of handling this.
>
> A rule of thumbs is that if you have to encode multiline contents,
> use an element and not an attribute, it fits really better in the
> XML framework.
>
> 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 : Sat Feb 10 2001 - 22:43:38 EST