Java XML Attribute Get getAttributeNode(Node sNode, String attribName)

Here you can find the source of getAttributeNode(Node sNode, String attribName)

Description

get Attribute Node

License

Open Source License

Declaration

public static Node getAttributeNode(Node sNode, String attribName) 

Method Source Code


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

public class Main {
    public static Node getAttributeNode(Node sNode, String attribName) {
        NamedNodeMap attrs = sNode.getAttributes();
        if (attrs != null) {
            return attrs.getNamedItem(attribName);
        }/*  w  w  w  .j  a v a 2s  .c o m*/
        return null;
    }
}

Related

  1. getAttributeName(Field field)
  2. getAttributeNames(Element el)
  3. getAttributeNames(Element element)
  4. getAttributeNames(final Element e)
  5. getAttributeNode(Node sNode, String attribName)
  6. getAttributeNodeList(Element element, Pattern name)
  7. getAttributeNS(Element el, String namespaceURI, String localPart)
  8. getAttributeNS(Element elem, String namespace, String att)
  9. getAttributeNSName(Element e, String attrName)