You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Thomas Schuerger <sc...@wjpserver.cs.uni-sb.de> on 2002/12/12 15:36:45 UTC

Literal strings in XML serialization

Hi,

I'm using the XMLSerializer for creating an XML reply. The problem is
that I'm creating an XML reply (with the usual methods like
startElement() and endElement()) that should contain parts of another
well-formed XML reply directly provided as a String. Looking at the
methods of a ContentHandler or XMLSerializer I did not find anything that
allows me to do that. My reply should look like follows:

..header stuff..
<mytag1>
  <mytag2>
    ...
  </mytag2>
  <mytag3>          | this should be added literally from a String I
    ...             | provide
  </mytag3>         |
</mytag1>

I am using a StringWriter for creating the XML reply, but simply
writing my String to the writer after ending the element mytag2 using
endElement() shows some buffering problems (e.g. in the output
"mytag2" is closed AFTER the string I added manually).

Is there any solution?


Greetings,
Thomas Schürger.   http://www.menden.org   http://www.annoncieren.de

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org