On Mon, Feb 21, 2005 at 09:31:51PM +0100, Aron Stansvik wrote:
> On Mon, 21 Feb 2005 11:55:53 -0600, Thomas Jones <[EMAIL PROTECTED]> wrote:
> I think you should just be able to do:
> 
> doc = xmlParseFile(BAD_CAST GenDigSig::getGenDigSigXMLSource());
> 
> But I'm not sure it's a good idea. Could anyone more experienced
> comment on this? I'm new to libxml2 myself.

  a char * in C has no precise meaning. It's a sequence of bytes ended by 0.
You need to know the encoding of that sequence of byte to handle them 
as charecters. an xmlChar * is a 0 terminated sequence of bytes
with an UTF8 encoding. This is documented !
   http://xmlsoft.org/encoding.html

Conclusion: you can use taht direct cast if you know the string encoding
    is UTF-8 (or ASCII which is a subset).

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to