}
// Then attributes, if any:
if (mAttrs != null && mAttrs.size() > 0) {
Iterator it = mAttrs.values().iterator();
while (it.hasNext()) {
Attribute attr = (Attribute) it.next();
// Let's only output explicit attribute values:
if (!attr.isSpecified()) {
continue;
}
w.write(' ');
QName name = attr.getName();
String prefix = name.getPrefix();
if (prefix != null && prefix.length() > 0) {
w.write(prefix);
w.write(':');
}
w.write(name.getLocalPart());
w.write("=\"");
String val = attr.getValue();
if (val != null && val.length() > 0) {
TextEscaper.writeEscapedAttrValue(w, val);
}
w.write('"');
}