public XmlWriter start(String name, String[] attrs, String[] values) {
        sb.append("<").append(name);
        for (int i = 0; i < Math.min(attrs.length, values.length); i++) {
            writeAttr(attrs[i], values[i]);
        }
        sb.append(">");
        tags.add(name);
        return this;
    }
Basic XML Writer helper library. It does not do full XML Well-Formedness
checks, but provides basic element and attribute value escaping, and tracks
open tags to simplify use.
<p>
Sampe usage:
<pre class="brush: java">
<code>
XmlWriter w = new XmlWriter();
w.start(DOC_TAG, "xmlns", DOC_NAMESPACE);
if (foo != null)
  w.start(FOO_TAG).value(foo).end();
w.end();
</code>
</pre>
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/XmlWriter.java