Hello,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi,</div>
<div> Could you just brief me how will you do it? and also i have to remove all the <int> tags from the document. Please reply as early as possible. Thanking you</div></blockquote></div><br>For example like that:<br>
<br>String xmlString2 = "<input><int><a>aaa</a><b>bbb</b></int></input>";<br> <br>Document doc = new SAXBuilder().build(new StringReader(xmlString2));<br><br>
Element rootEl = doc.getRootElement();<br> <br>Element intEl = rootEl.getChild("int");<br>rootEl.removeContent(intEl);<br>rootEl.addContent(intEl.removeContent());<br> <br>new XMLOutputter().output(doc, System.out);<br>
<br>I get: <br><?xml version="1.0" encoding="UTF-8"?><br><input><a>aaa</a><b>bbb</b></input><br><br>Regards,<br>Grzegorz<br clear="all"><br>-- <br>To be a man is, precisely, to be responsible.<br>