Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

When does ampersand get translated into ampersand amp semicolon?

843834Oct 29 2002 — edited Oct 30 2002
Hi,

I am translating data into XML using JAXP-1.1. Some of my data has ampersands in it, and it gets translated
into what would be required to display it correctly in html, which is an ampersand plus "amp" plus a semicolon.

Does anyone know where in the process this happens, where the documentation is that says which
characters get translated, and (of secondary concern) if there is an easy way to translate other characters?

The steps are roughly:
Create an xml Document
Add various nodes which contain text
Create a Transformer
Create a DOMSource ( DOMSource domSrc = new DOMSource(m_xmlDocument); )
Create an OutputStream
Transform the document into the OutputStream ( transformer.transform(domSource, outputStream);

Does anyone know the answers to the above questions?

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2002
Added on Oct 29 2002
4 comments
312 views