Java XML Attribute Set setAttribute(final Element element, final String name, final String value)

Here you can find the source of setAttribute(final Element element, final String name, final String value)

Description

set Attribute

License

Open Source License

Declaration

public static Element setAttribute(final Element element,
            final String name, final String value) 

Method Source Code

//package com.java2s;
/*//from   www .ja  va2  s  .  co  m
 * This program and the accompanying materials are made available
 * under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   SEARCH Group, Incorporated - initial API and implementation
 *
 */

import org.w3c.dom.Element;

public class Main {
    public static Element setAttribute(final Element element,
            final String name, final String value) {
        element.setAttribute(name, value);
        return element;
    }
}

Related

  1. setAttribute(Element element, String attributeName, String value)
  2. setAttribute(Element element, String attrName, Object value)
  3. setAttribute(Element element, String name, String value)
  4. setAttribute(Element targetElem, String name, String value)
  5. setAttribute(final Element element, final String attrName, final Object value)
  6. setAttribute(Node n, String name, String value)
  7. setAttribute(Node node, String attName, String val)
  8. setAttribute(Node node, String attr, String value)
  9. setAttribute(Node node, String key, String value)