Java XML Attribute Get getAttribute(Element e, String name)

Here you can find the source of getAttribute(Element e, String name)

Description

get Attribute

License

Open Source License

Declaration

public static String getAttribute(Element e, String name) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Element;

public class Main {
    public static String getAttribute(Element e, String name) {
        if (e.getAttribute(name) == null)
            return "";
        return e.getAttribute(name);
    }/*from w  w w  .  ja va  2s. c  o  m*/
}

Related

  1. getAttribute(Element e, String attribute)
  2. getAttribute(Element e, String attrName, String def)
  3. getAttribute(Element e, String name)
  4. getAttribute(Element e, String name)
  5. getAttribute(Element e, String name)
  6. getAttribute(Element el, String attrName)
  7. getAttribute(Element el, String attrName)
  8. getAttribute(Element el, String attrName)
  9. getAttribute(Element elem, String attName, boolean mandatory)