src/main/java/com/rockagen/commons/util/XmlUtil.java
public static String formatCompact(String xmlStr, String enc) {
        return formatCompact(xmlStr, enc, false);
    }
public static String formatCompact(String xmlStr, String enc) {
        return formatCompact(xmlStr, enc, false);
    }
Format xml {@link OutputFormat#createCompactFormat()}

@param xmlStr xml String
@param enc    encoding
@return Compact xml String