[xsd-users] Casting xsd:string to const char*
Boris Kolpackov
boris at codesynthesis.com
Mon Sep 20 12:50:55 EDT 2010
Hi Clarence,
#MOK BAO REN CLARENCE# <MOKB0001 at e.ntu.edu.sg> writes:
> Im a newbie to C++ and XSD. Here goes my problem.
Please note that this mailing list is not for questions about C++
usage. For help with C++ use one of the many mailing lists, forums,
and newsgroups.
> This is what I am trying to do:
>
> [...]
>
> i->filename () returns a xsd:string and I am trying to store it
> into a char * string for further processing in my C++ application.
std::string has a member function called c_str () that returns
const char*. So you can do:
const char* s = i->filename ().c_str ();
Boris
More information about the xsd-users
mailing list