Java XML Attribute Get getAttributeValue(Node node, String attribute)

Here you can find the source of getAttributeValue(Node node, String attribute)

Description

get Attribute Value

License

Open Source License

Declaration

public static String getAttributeValue(Node node, String attribute) 

Method Source Code


//package com.java2s;
import org.w3c.dom.Node;

public class Main {
    public static String getAttributeValue(Node node, String attribute) {
        Node att = node.getAttributes().getNamedItem(attribute);

        if (att == null)
            return null;

        return att.getTextContent();
    }/*from ww w  . j a  va  2s .com*/
}

Related

  1. getAttributeValue(Node n, String name)
  2. getAttributeValue(Node n, String nodePath, String attrName)
  3. getAttributeValue(Node node, String attName)
  4. getAttributeValue(Node node, String attName)
  5. getAttributeValue(Node node, String attribute)
  6. getAttributeValue(Node node, String attribute)
  7. getAttributeValue(Node node, String attributeName)
  8. getAttributeValue(Node node, String attributeName)
  9. getAttributeValue(Node node, String attributeName)