Actually, there are predefined entities for ' and ".  See 
http://www.w3.org/TR/2004/REC-xml-20040204/#sec-predefined-ent.

> -----Original Message-----
> From: Matthias Niggemeier [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 20, 2005 8:19 AM
> To: [email protected]
> Subject: RE: convert the entities ' and "
> 
> Enzo,
> I think you are confusing XML and HTML. In fact, there is no
> entitiy ref für " or ' (unless you define them). It may depend
> on the used encoding if these chars have to be masked, but
> within UTF16 you can use them as in your mail.
> 
> Regards
> 
> Matthias 
> 
> > -----Original Message-----
> > From: AESYS S.p.A. [Enzo Arlati] [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, September 20, 2005 2:01 PM
> > To: [EMAIL PROTECTED] Apache. Org (E-mail)
> > Subject: convert the entities ' and "
> > 
> > 
> > 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]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to