Java XML Attribute from Element getStringAttributeValue(Element element, String attribute)

Here you can find the source of getStringAttributeValue(Element element, String attribute)

Description

get String Attribute Value

License

Open Source License

Declaration

public static String getStringAttributeValue(Element element, String attribute) 

Method Source Code

//package com.java2s;

import org.w3c.dom.*;

public class Main {
    public static String getStringAttributeValue(Element element, String attribute) {
        Attr a = element.getAttributeNode(attribute);
        return a != null ? a.getValue() : null;
    }/* www . j a  v a 2s. c o m*/
}

Related

  1. getIntegerAttribute(Element el, String attribute)
  2. getIntegerAttribute(Element element, String name)
  3. getStringAttr(Element element, String name, String def)
  4. getStringAttribute(Element e, String name, String def)
  5. getStringAttribute(Element el, String attribute)
  6. getStringAttributeValue(final Element element, final String attributeName)
  7. getStringAttributeValue(final Element element, final String attributeName)
  8. getTagAttribute(String sTag, String sAtt, Element eElement)
  9. getTagAttribute(XMLStreamReader xmler, String attribute, String defaultValue)