You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by jalal <he...@yahoo.co.uk> on 2001/12/04 17:52:08 UTC

Use of Transcode...

Hi All

I notice that XMLString::Transcode(...) creates a buffer that the user must
free up. Or the user can pass a buffer for the transcoder to use.

Which is the better way of doing Transcoding? i.e.[pseudo code]

char* res = XMLString::transcode( mystring );
// do something
delete [] char;

or

char buff[BUFFSIZE];
XMLString::transcode( mystring, buff, BUFFSIZE );

How can I find out how large a buffer to use? Currently I'm just assuming
double the size of mystring...

Really my question is, what is considered best practise for converting
strings in and out of an XML file.

cheers
jalal






---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org