Here you can find the source of setAttribute(final Element element, final String name, final String value)
public static Element setAttribute(final Element element, final String name, final String value)
//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; } }