Is there any way I can concatenate an XMLCh* to a string. I looked into the XMLString functions but couldn't find any, which does this (maybe I am missing something).
Why couldn't you use the XMLString class? the catString methods are static. So you could
make an appended buffer of XMLCh. If that is the output from the parser in the document
handler.
That is what the parser returns to you, XMLCh ( a UTF16 buffer). then you could call the
method transcode on the XMLString class to get the resiult in a char* buffer.
Then you can convert from C-style to C++ style automatically.
char* result = NULL; . . .
string sResult = result;
Another way is to call the XMLString::transcode method, get the char *, and use it in your
string object so you can concatena string objects.
Basically I want to output a JavaScript variable with a value from an XML file along with the tranformed output. I don't want to trancode it to a char* because that would create problems if the value is in some other encoding.
But the parser is going to give the content as Unicode. You will have to transcode it if
XML file was not in UTF-16.
What is your data like? Is the web page for your javaScript encoding Unicode? ( this
would be in the <META> tag of your document's header).
Anyways, if I could concatnate an XMLCh* with a string would solve my problem.
Not such thing. you will have to write your own method.
Remember that XMLCh* is a buffer to a double byte value (a short in most cases). The data in this
double byte is Unicode.
In your string ( because you did not said that you were using a wstring) can be treated as an
array of characters (single byte).
So concatenate a XMLCh* with a string would be an strange operarion, what behavior would
you expect?
Regards, Jeffrey Rodriguez
Would be glad if someone could send me pointers to the solution.
Thanks, Ashay.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Need more e-mail storage? Get 10MB with Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
