RapidXML is one of the available libraries for parsing XML in c++. For getting the values, we can use something like:
node->first_node("xmlnode")->value()
This command returns a char* data type. Is there any way to read the value as Unicode so I can assign it in a WCHAR or wstring variable?
here you need convert str to wstr. you can use for this standart std
hope this help
From the manual
so I just use the following:
Note that if you do this, all parameters will be wchar_t, so the call to first_node() also needs to wchar_t. i.e.
Another solution is using the functions given in: http://msmvps.com/blogs/gdicanio/archive/2010/01/04/conversion-between-unicode-utf-16-and-utf-8-in-c-win32.aspx