use of nl.nn.adapterframework.xml.CanonicalizeFilter in project iaf by ibissource.
the class XmlUtils method canonicalize.
public static String canonicalize(String input) throws IOException {
XmlWriter xmlWriter = new XmlWriter();
xmlWriter.setIncludeComments(false);
ContentHandler handler = new PrettyPrintFilter(xmlWriter);
handler = new CanonicalizeFilter(handler);
try {
XmlUtils.parseXml(input, handler);
return xmlWriter.toString();
} catch (SAXException e) {
throw new IOException("ERROR: could not canonicalize [" + input + "]", e);
}
}
Aggregations