[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    Re: porting Java to C++
From:       Radovan CHYTRACEK <Radovan.Chytracek () cern ! ch>
Date:       2001-08-30 9:33:54
[Download RAW message or body]



Wang, Xinju wrote:

> 1. If I need to port my C++ application to other platforms, should I stick
> with XMLCh? If so, how can I convert a char to an XMLCh?
> 2. Any sample code on using XMLString? Any other string helper class around?


In case it's enough the local code page you can try:

////////////////////////////////////////////////////////////////////

char* asciistr = "This is ASCII";

XMLch* xmlstr = XMLString::transcode( asciistr );

// Play with the XML string
.....

// You must free the XML string returned by transcoding method
delete [] xmlstr;

////////////////////////////////////////////////////////////////////

Hope this helps

Radovan

-- 

  Radovan Chytracek                  CERN Division IT/API, Geant4
  e-mail: Radovan.Chytracek@cern.ch  WWW: http://cern.ch/chytrace
  phone:  +41 22 76 78871



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic