Java XML Attribute Get getAttribute(Element element, String nodeName)

Here you can find the source of getAttribute(Element element, String nodeName)

Description

Returns the attribute of the provided nodeName.

License

Open Source License

Parameter

Parameter Description
element Parent element
nodeName the Node Name

Return

Attribute Name

Declaration

public static String getAttribute(Element element, String nodeName) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    /**// w  w  w. ja  v a 2  s  .  c  o m
     * Returns the attribute of the provided nodeName.
     * @param element Parent element
     * @param nodeName the Node Name
     * @return Attribute Name
     */
    public static String getAttribute(Element element, String nodeName) {
        return element.getAttribute(nodeName);
    }
}

Related

  1. getAttribute(Element element, String name)
  2. getAttribute(Element element, String name)
  3. getAttribute(Element element, String name)
  4. getAttribute(Element element, String name, String defaultVal)
  5. getAttribute(Element element, String namespace, String name)
  6. getAttribute(Element ownerElem, String attrName)
  7. getAttribute(Element parent, String localName)
  8. getAttribute(Element parent, String localName, String namespaceURI)
  9. getAttribute(File file, String attr)