private static void appendNode(StringBuilder xml, String name, Object contents, Object... attributes) { if (contents != null || attributes.length > 0) { xml.append('<').append(name); appendAttributes(xml, attributes); if (contents != null) { xml.append('>'); escapeXml(contents, xml); xml.append("</").append(name).append('>'); } else { xml.append("/>"); } } }
private static void appendNode(StringBuilder xml, String name, Object contents, Object... attributes) { if (contents != null || attributes.length > 0) { xml.append('<').append(name); appendAttributes(xml, attributes); if (contents != null) { xml.append('>'); escapeXml(contents, xml); xml.append("</").append(name).append('>'); } else { xml.append("/>"); } } }