Mega Code Archive

 
Categories / Java Tutorial / XML
 

Return the right attribute node

import org.w3c.dom.Attr; import org.w3c.dom.Element; public class Main {   // return the right attribute node   public static Attr getAttr(Element elem, String name) {       return elem.getAttributeNode(name);   } // getAttr(Element, String):Attr   }