Java XML Attribute Get getAttributeStringValue(Node htmlForm, String attributeName, String defaultValue)

Here you can find the source of getAttributeStringValue(Node htmlForm, String attributeName, String defaultValue)

Description

get Attribute String Value

License

Open Source License

Declaration

protected static String getAttributeStringValue(Node htmlForm, String attributeName, String defaultValue) 

Method Source Code

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

import org.w3c.dom.Node;

public class Main {
    protected static String getAttributeStringValue(Node htmlForm, String attributeName, String defaultValue) {
        Node item = htmlForm.getAttributes().getNamedItem(attributeName);
        return item == null ? defaultValue : item.getNodeValue();
    }/*from   ww w  .  j a  va 2  s . com*/
}

Related

  1. getAttributesAsMap(Element e)
  2. getAttributesByName(Node node, ArrayList attrNames)
  3. getAttributesCompact(NamedNodeMap attributes)
  4. getAttributesNamesOf(Element element)
  5. getAttributeString(Node node, String name)
  6. getAttributeStringValue(String attribute, NamedNodeMap namedNodeMap)
  7. getAttributesValues(final StartElement element)
  8. getAttributeTable(Element element)
  9. getAttributeText(final Node node, final String name)