Here you can find the source of addAttribute(Document doc, org.w3c.dom.Element e, String index, String value)
public static Node addAttribute(Document doc, org.w3c.dom.Element e, String index, String value)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Document; import org.w3c.dom.Node; public class Main { public static Node addAttribute(Document doc, org.w3c.dom.Element e, String index, String value) { e.setAttribute(index, value);//from w ww . j av a 2 s. c om return e; } }