Hi,
  Given arbitrary data in a std::string what is the recommended way to
turn that into a CDATA node when building a DOM?

string mystr = ...;
XMLCh* xch = XMLString::transcode( mystr.c_str() );
DOMElement* el = ...;
DOMCDATASection* childVal = dom->createCDATASection( xch );
el->appendChild( childVal );

It seems to be difficult to preserve arbitrary 8 bit data from a
std::string into a CDATA definition.

Thanks for any advice.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to