I build a DOM document and inside a Node I put some string with the standard
entities ( ie. & < > ' and " ).
The first 3 entities are converted in their equivalent entity reference
 ie. &amp; &lt; &gt; )
while the last 2 are not converted ( as show in the example belowe.
What can I do in order to tell the xerces to replace it with their enity
ref.
Please , if possible, send me an example.

    DOMImplementation * impl =
DOMImplementationRegistry::getDOMImplementation( X("LS") );

    if( impl != NULL )
    {
       DOMDocument * pDoc = impl->createDocument( 0, X("Messaggio"), 0 );
       pDoc->setEncoding( X("UTF-16") );
       DOMElement * pRoot = pDoc->getDocumentElement();
       DOMElement * pTest = pDoc->createElement( X("TEST2") );
       pRoot->appendChild( pTest );
       stmp = " std_entities: & < > \" ' ";
       dtxt = pDoc->createTextNode( X( stmp.c_str()));
       pTest->appendChild( dtxt );
       .............
    }

DOCUMENT: <?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<Messaggio><TEST2> std_entities: &amp; &lt; &gt; " ' </TEST2></Messaggio>

Regards, Enzo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to