Hi,<br><br>I believe you should not disable escaping when outputting XML file. It is fine it is working :). <br><br>I would serialize the element to ByteArrayOutputStream using XMLOutputter, then create a string out of it and add a Comment element with the serialized form of your element as its text.
<br><br>The only drawback of this solution is that your element will have namespace declarations inside. From the view of XML infoset this is not a problem - it will be working if someone uncomments it.<br><br>Regards,<br>
Grzegorz<br><br><div><span class="gmail_quote">2007/12/6, Jan Brauer &lt;<a href="mailto:jan.brauer@coremedia.com">jan.brauer@coremedia.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I&#39;m currently writing a tool to merge different fragments into a<br>web.xml. I&#39;m looking for a way to surround an element with comments.<br>I&#39;ve added a namespaced attribute to the element. Based on this I&#39;m
<br>trying to surround the Element with two Text elements:<br><br>Text intro = new Text(&quot;&lt;!--&quot;);<br>Text outro = new Text(&quot;--&gt;&quot;);<br><br>Unfortunately the pointy brackets are escaped. I haven&#39;t found a way to
<br>disable the escaping:<br><br>new Text(&quot;&amp;lt;--&quot;)<br>resolves to:<br><br>&quot;&amp;amp;lt;--&quot;<br><br>What can I do to disable the escaping for those two Text elements? Or is<br>there an even better way to accomplish what I&#39;m trying?
<br><br>Thx,<br>Jan<br><br><br><br>_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
</a><br></blockquote></div><br><br clear="all"><br>-- <br>&quot;Choć tyle wiemy własnym doświadczeniem:<br>W nas jest Raj, Piekło - i do obu - szlaki.&quot;<br>J.K.