Here you can find the source of getAttribURL(Element ele, String name, URL docRoot)
public static URL getAttribURL(Element ele, String name, URL docRoot)
//package com.java2s; import org.w3c.dom.*; import java.net.*; public class Main { public static URL getAttribURL(Element ele, String name, URL docRoot) { String sval = ele.getAttribute(name); URL url;/*from w w w . j a va 2 s . co m*/ try { return new URL(docRoot, sval); } catch (Exception e) { return null; } } }