List of utility methods to do XML Attribute Create
void | writeAttribute(PrintWriter w, Attr attr, int depth) write Attribute w.write(attr.getName()); w.write('='); Node c = attr.getFirstChild(); while (c != null) { w.write('"'); writeNode(w, c, depth); w.write('"'); c = c.getNextSibling(); ... |
void | writeAttribute(XMLStreamWriter writer, String name, Object value) write Attribute if (value != null) {
writer.writeAttribute(name, value.toString());
|
void | writeAttribute(XMLStreamWriter xmlw, String name, String value) write Attribute if (!StringUtilisEmpty(value)) {
xmlw.writeAttribute(name, value);
|
void | writeAttributeEvent(XMLEvent event, XMLStreamWriter writer) write Attribute Event Attribute attr = (Attribute) event;
QName name = attr.getName();
String nsURI = name.getNamespaceURI();
String localName = name.getLocalPart();
String prefix = name.getPrefix();
String value = attr.getValue();
if (prefix != null) {
writer.writeAttribute(prefix, nsURI, localName, value);
...
|
void | writeAttributes(Node node, Writer out) write Attributes NamedNodeMap attributes = node.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Node attribute = attributes.item(i); String name = attribute.getNodeName(); if (!name.toLowerCase().startsWith("xmlns")) { out.write(" " + name + "=\"" + escapeHTMLAttribute(attribute.getNodeValue()) + "\""); |
void | writeBoolAttr(Element element, String attributeName, boolean value) write Bool Attr element.setAttribute(attributeName, Boolean.toString(value)); |
void | writeOutAttributesForNode(String[][] attributes, Node node) write Out Attributes For Node if (attributes != null) { for (int n = 0; n < attributes.length; n++) { String key = attributes[n][0]; String value = attributes[n][1]; if ((key != null) && (value != null)) { Attr attNode = node.getOwnerDocument().createAttribute(key.toString()); attNode.setNodeValue(value.toString()); node.getAttributes().setNamedItem(attNode); ... |
void | writeSvgAttributes(XMLStreamWriter w, Supplier Write common attributes to the XMLStreamWriter
if (cssClass != null) { w.writeAttribute("class", cssClass.get()); if (fill != null) { w.writeAttribute("fill", fill.get()); if (stroke != null) { w.writeAttribute("stroke", stroke.get()); ... |
void | writeXmlAttribute(XMLStreamWriter out, String name, Date value) DOCUMENTME. String str = null; if (value != null) { SimpleDateFormat format = (SimpleDateFormat) dateFormat.clone(); str = format.format(value); } else { str = ""; out.writeAttribute(name, str); ... |