See XMLString::transcode(). Works boths ways. Just remember to use 
XMLString::release() as well.

char* myCString = "some string";
XMLCh* myXMLString = XMLString::transcode(myCString);
// use it
...
if (myXMLString != NULL) XMLString::release(&myXMLString);

or

...
const XMLCh* myXMLString = someNode->getTagName();
char* myCString = XMLString::transcode(myXMLString);

// use it
...
if (myCString != NULL) XMLString::release(&myCString);

Ben


----- Original Message ----
From: "Rackl, Robert G" <[email protected]>
To: [email protected]
Sent: Wednesday, July 29, 2009 6:41:26 PM
Subject: XMLString Class and ordinary C-strings

Using the DOMCount sample as a guide, I am developing a module with a
bunch of subroutines to parse and validate an XML file, and then to
extract data from it. The subroutines are to be called from Fortran, and
all output to cerr is to be converted to go to status strings in the
calls from Fortran. I can parse/validate the document by a call from
Fortran. I am stuck at converting ordinary plain ASCII null-terminated
C-strings to XMLStrings and vice versa. How is that done, please?

  -_r4_\.
___`o-#^o`__

Reply via email to