You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Jean-Francois Beaulac <je...@beetext.com> on 2007/06/08 21:01:52 UTC
Serializing a DOM tree to XML file, customize entities replacement
Hi,
I am currently building a DOM tree using the Xerces implementation and then
write it to a String using the Xalan transformer. I currently have a
problem with line breaks (I use System.getProperty("line.separator")) in the
text nodes being replaced by the entity . The application I am trying
to then send the XML message to does not transform that entity back into a
line break.
Is there a way to tell Xalan to use either a custom set of entities, or to
remove specific entities from this automatic treatment or am I force the
reparse manually the result to replace the back to a normal line
separator. Having a way to tell the transformer to use a custom set of
entities would be my best option since the application I communicate with
only threats:
- <
- >
- &
- '
- "
Thank you
================================
Jean-Francois Beaulac
jean-francois.beaulac@beetext.com