Java XML Attribute Add addAttribute(final Element element, final String attributeName, final String value)

Here you can find the source of addAttribute(final Element element, final String attributeName, final String value)

Description

add Attribute

License

Apache License

Declaration

public static Element addAttribute(final Element element, final String attributeName, final String value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Element;

public class Main {
    public static Element addAttribute(final Element element, final String attributeName, final String value) {
        element.setAttribute(attributeName, value);

        return element;
    }/*from   ww w.j  a va  2s. com*/
}

Related

  1. addAttribute(Document xmlDoc, Node node, String attrName, String attrValue)
  2. addAttribute(Element el, String name, String val)
  3. addAttribute(Element elem, String name, String value)
  4. addAttribute(final AttributesImpl attributes, final String localName, final Object value)
  5. addAttribute(final Document doc, final Element parent, final String name, final String value)
  6. addAttribute(final Node e, final String name, final String value)
  7. addAttribute(final Node node, final Attr attribute)
  8. addAttribute(Node parent, String name, String value)
  9. addAttribute(Node pNode, String attrName, String attrValue)