Re: libxml2 in gnome 1.4



On Fri, 23 Mar 2001, Daniel Veillard wrote:

>  Loading:
>     - having an XML file with non ascii content.
>     - you parse it, libxml new version will probably give a warning
>       if the encoding is not declared and then assume ISO-Latin-1 charset
>       (a real parser is supposed to stop there but libxml1 will go on)
>     - however the content as passed to the SAX callback or in the XML
>       tree will be encoded in UTF8 (i.e. a variable lenght encoding
>       using 2 bytes for [0x80 - 0xFF]). this is the difference in behaviour
>       you will see at with libxml1 when loading, i.e. chars outside the
>       ascii range will now be UTF8 encoded.
>  Saving (assuming you have a DOM tree):
>     - libxml new version will expect to have an UTF8 tree, if you try to
>       save a tree where chunk where added outside the ASCII range or 
>       not UTF8 encoded well the library will emit warnings (but i thing
>       it will still try to serailize them using character references).

Could we see some solid code please?
Something _very_ general:
	1, I have an xmlNodePtr, how do I fill a gchar* with its
content/the value of one of its properties?
	2, I have a gchar* that I know nothing about, how do I save it as
the content/the value of one of the properties of an xmlNodePtr?

I think this would really make the transition easy.

-- 
   .--= ULLA! =----------------------------.  finger cactus cactus rulez org
   \      http://cactus.rulez.org           \   for PGP public key
    `----------= cactus cactus rulez org =--'
There's nothing wrong with Doubles_ace fŘ8637üĄŚü-?7˛63x-


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




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