XMLUtil { public void appendAttribute(final Appendable appendable, final CharSequence attrName, final boolean attrValue) throws IOException { this.appendAttribute(appendable, attrName, Boolean.toString(attrValue)); } XMLUtil(final XMLEscaper escaper); static XMLUtil create(); void appendEAttribute(final Appendable appendable, final CharSequence attrName,
                                 final String attrRawValue); void appendAttribute(final Appendable appendable, final CharSequence attrName,
                                final boolean attrValue); void appendAttribute(final Appendable appendable, final CharSequence attrName,
                                final int attrValue); void appendAttribute(final Appendable appendable, final CharSequence attrName,
                                final CharSequence attrValue); void appendAttribute(final Appendable appendable, final CharSequence attrName,
                                final AttributeValue attrValue); void appendAttribute(final Appendable appendable, final CharSequence attrName,
                                final List<?> attrs, final String sep); void appendTag(final Appendable appendable, final CharSequence tagName,
                          final String content); String escapeXMLAttribute(final String s); String escapeXMLContent(final String s); String formatTimeInterval(final long milliseconds); String formatTimeInterval(final long years, final long months, final long days,
                                     final long hours, final long minutes, final double seconds); String formatNegTimeInterval(final long years, final long months, final long days,
                                        final long hours, final long minutes,
                                        final double seconds); static final String XML_PROLOG; static final char SPACE_CHAR; }
@Test public void testBooleanAttr() throws IOException { this.xu.appendAttribute(this.sb, "attr", true); Assert.assertEquals(" attr=\"true\"", this.sb.toString()); }
@Test public void testIntAttr() throws IOException { this.xu.appendAttribute(this.sb, "attr", 7); Assert.assertEquals(" attr=\"7\"", this.sb.toString()); }
@Test public void testStringAttr() throws IOException { this.xu.appendAttribute(this.sb, "attr", "value&"); Assert.assertEquals(" attr=\"value&\"", this.sb.toString()); }