List of utility methods to do XML Attribute Set
void | setXmlAttributeValue(Document xml, Element elem, String name, String value) set Xml Attribute Value Attr a = xml.createAttribute(name); a.setValue(value); elem.getAttributes().setNamedItem(a); |
void | clearAttributes(Attributes attributes, Map I should have documented these properly when I first wrote them. final int attributesLength = attributes.getLength(); for (String key : tagCache.keySet()) { tagCache.put(key, -1); for (int i = 0; i < attributesLength; i++) { String name = attributes.getLocalName(i); tagCache.put(name, i); |
void | addElementWithTagAttr(StringBuffer out, String tag, String content, String[] attr) Add a tag with attributes to the StringBuffer out. out.append("<").append(tag); for (int i = 0; i < attr.length; i++) { out.append(" ").append(attr[i]); out.append(">").append(content).append("</").append(tag) .append(">"); |