On Wed, Dec 23, 2009 at 10:40:21AM -0500, Michel Audette wrote:
> Dear fellow XML developers,
> 
> I was able to find a way of converting from char* to xmlChar* via
> xmlCharStrdup, but my collaborators and I were wondering if there were
> a function that does the reverser conversion, from xmlChar* to char*,
> other than a cast.

  http://xmlsoft.org/FAQ.html#Developer item 12

> We prefer to do this with a function than a cast if possible.

  If you're asking for a function, then that means you didn't
understand the concept behind xmlChar*

  If your char * points to a zero terminated string in UTF-8 encoding
then a cast *is* the proper way. If it's not that will depend on your
encoding and no generic function can do it one way or another, except
an encoding conversion function like iconv.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to