List of usage examples for org.jdom2.output XMLOutputter outputElementContent
public final void outputElementContent(Element element, Writer out) throws IOException
Element
's content only, not including its tag, and attributes. From source file:AIR.Common.xml.XmlElement.java
License:Open Source License
public String getInnerXml() { XMLOutputter outp = new XMLOutputter(); outp.setFormat(Format.getCompactFormat()); try (StringWriter sw = new StringWriter()) { if (_element instanceof Element) outp.outputElementContent((Element) _element, sw); else {//from w w w .j ava 2 s . co m // TODO: What to do for other types of Content? } return sw.toString(); } catch (IOException e1) { e1.printStackTrace(); throw new XmlReaderException(e1); } }