List of usage examples for com.liferay.portal.kernel.xml DocumentException DocumentException
public DocumentException(Throwable cause)
From source file:com.liferay.portlet.dynamicdatamapping.util.DDMXMLImpl.java
License:Open Source License
public String formatXML(String xml) throws DocumentException, IOException { // This is only supposed to format your xml, however, it will also // unwantingly change © and other characters like it into their // respective readable versions xml = StringUtil.replace(xml, "&#", "[$SPECIAL_CHARACTER$]"); try {//from w ww .j ava2s.co m xml = XMLFormatter.toString(xml, _XML_INDENT); } catch (org.dom4j.DocumentException de) { throw new DocumentException(de.getMessage()); } xml = StringUtil.replace(xml, "[$SPECIAL_CHARACTER$]", "&#"); return xml; }