Android XML Node Attribute Get getAttributeValue(Node node, String attributeName)

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

Description

get Attribute Value

Declaration

public static String getAttributeValue(Node node, String attributeName) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    public static String getAttributeValue(Node node, String attributeName) {
        Node n = node.getAttributes().getNamedItem(attributeName);
        if (n == null)
            return null;
        else/*from   ww  w .j a v a 2s .  c om*/
            return n.getTextContent();
    }
}

Related

  1. getAttrOfName(Node node, String string)
  2. getAttribute(Node node, String name)
  3. getAttributeValue(Node node, String attributeName)
  4. getAttributeValueAsInt(Node node, String attributeName)
  5. getElementAttr(Node element, String attrName)
  6. getElementAttr(Node element, String attrName)