xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AESYS S.p.A. [Enzo Arlati]" <enzo.arl...@aesys.it>
Subject using non standard character with zerces
Date Wed, 14 Sep 2005 12:24:18 GMT

I' m using a code like the one show belowe to build a DOM document.

       DOMElement * pTestRef;
       string stmp;
       stmp = string( "this is a test: <> & &#165; " );
       pTestRef = pDoc->createElement( X("TEST_REFERENCE_1") );
       dtxt                  = pDoc->createTextNode( X( stmp.c_str()));
       pRoot->appendChild( pTestRef );
       pTestRef->appendChild( dtxt );

The output I get is show belowe, where entities >,> and & a re corretly
translated.

<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<Messaggio>
......
<TEST_REFERENCE_1>this is a test: &lt;&gt; &amp; &amp;#165;
</TEST_REFERENCE_1>
</Messaggio>

What I can't do is to pass other entities in hex or decimal notation like
&#165 for the euro character, because the first & which is part of the whole
enitiy is translated separately.
How is possible to tell to DOMWriter to leave as is ( without translate teh
& char ) entities composed by more characters ( like &#xA5;  , &#165; or
&lt; )

Regards,
Enzo Arlati
enzo.arlati@aesys.it



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


Mime
View raw message