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 <<a href="mailto:jan.brauer@coremedia.com">jan.brauer@coremedia.com</a>>:</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'm currently writing a tool to merge different fragments into a<br>web.xml. I'm looking for a way to surround an element with comments.<br>I've added a namespaced attribute to the element. Based on this I'm
<br>trying to surround the Element with two Text elements:<br><br>Text intro = new Text("<!--");<br>Text outro = new Text("-->");<br><br>Unfortunately the pointy brackets are escaped. I haven't found a way to
<br>disable the escaping:<br><br>new Text("&lt;--")<br>resolves to:<br><br>"&amp;lt;--"<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'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>"Choć tyle wiemy własnym doświadczeniem:<br>W nas jest Raj, Piekło - i do obu - szlaki."<br>J.K.