Clint Barlow wrote:
> Hi, I have a function that returns a std::string that I
need to convert
> to an xmlChar*. What is the best way to do this? I
get a compiler
> error when I use the BAD_CAST macro. I'm fairly new to
to C and
> libxml. Thanks for your help.
To extract a 'char const *' from a std::string you have to
call its c_str()
method. That you can cast using BAD_CAST. (But make sure it
gets appropriately
copied, depending on where you us it !)
HTH,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|