Re: [xml] simple questions



Dnia 2005-09-09 19:36, Andre Street napisaÅ:
...and now I'm stuck, because I havn't a clue how to cast the retrieved xmlchar* into something usable as a basic data type on my system ie. a char*, or even a c++ 'string' (the data originates as a simple string, no control characters, e.g. '48' or 'pizza').

As far as I know, you can just cast xmlChar* to char*. (i.e. char *sth = (char *)xmlNodeGetContent (...)). std::string should have constructor taking char* argument, so str = new std::string ((char *)content) would be OK.

--
  PrzemysÅaw Sitek



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