List of utility methods to do XML Attribute Print
void | printAttribute(Node node, int level) Prints attribute variables of the specified node. for (int i = 0; i < level; i++) { System.out.print(" "); System.out.println("<" + node.getNodeName() + " = " + node.getNodeValue() + ">"); |
List | printAttribute(String nombre, NodeList nodes) print Attribute List<String> nodeText = new ArrayList<String>(); for (int i = 0; i < nodes.getLength(); i++) { Node node = (Node) nodes.item(i); nodeText.add(normalizeName(giveAttributeNode(nombre, node))); return nodeText; |
List | printAttribute(String nombre, NodeList nodes) Este metodo convierte un objeto de tipo org.w3c.dom.NodeList a List Este metodo solo saca el atributo especificado con nombre List<String> nodeText = new ArrayList<String>(); for (int i = 0; i < nodes.getLength(); i++) { Node node = (Node) nodes.item(i); nodeText.add(normalizeName(giveAttributeNode(nombre, node))); return nodeText; |
void | printAttribute(XMLStreamReader xmlr, int index, StringBuffer result) print Attribute String prefix = xmlr.getAttributePrefix(index); String namespace = xmlr.getAttributeNamespace(index); String localName = xmlr.getAttributeLocalName(index); String value = xmlr.getAttributeValue(index); result.append(" "); printName(prefix, namespace, localName, result); result.append("='").append(value).append("'"); |
void | printAttributes(Element element) print Attributes NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Node node = attributes.item(i); System.err.println("## prefix=" + node.getPrefix() + " localname:" + node.getLocalName() + " value=" + node.getNodeValue()); |
void | printAttributes(NamedNodeMap attributes, String indent, boolean descend) print Attributes System.out.println(); for (int i = 0; i < attributes.getLength(); ++i) { System.out.println(indent + "-- Attribute: " + i + " -----"); printToTerminal(attributes.item(i), indent + " ", descend); System.out.println(indent + "-- ^last attribute --\n"); |
void | printAttributes(XMLStreamReader xmlr) Print out element attributes if (xmlr.getAttributeCount() > 0) { System.out.println("\nHAS ATTRIBUTES: "); int count = xmlr.getAttributeCount(); for (int i = 0; i < count; i++) { QName name = xmlr.getAttributeName(i); String namespace = xmlr.getAttributeNamespace(i); String type = xmlr.getAttributeType(i); String prefix = xmlr.getAttributePrefix(i); ... |
void | printAttributesCompact(NamedNodeMap attributes, String indent, boolean descend) print Attributes Compact System.out.println(indent + "Attributes: " + getAttributesCompact(attributes));
|
void | printAttrs(Element elem, String endient, PrintStream pstrm) print Attrs NamedNodeMap attrs = elem.getAttributes(); if (attrs.getLength() == 0) { pstrm.print(">"); return; Attr attr = (Attr) attrs.item(0); if (attrs.getLength() == 1) { pstrm.print(" " + attr.getName() + "=\"" + attr.getValue() + "\">"); ... |
String | printImageAttributeType(Integer value) print Image Attribute Type if (value == null || !isValidImageAttributeType(value)) throw new IllegalArgumentException("Can't print image-attribute value!"); else return DatatypeConverter.printInt(value); |