List of usage examples for java.net URL URL
public URL(URL context, String spec) throws MalformedURLException
From source file:Main.java
public static URL getAttribURL(Element ele, String name, URL docRoot) { String sval = ele.getAttribute(name); try {/* www .j a v a 2 s.c om*/ return new URL(docRoot, sval); } catch (Exception e) { return null; } }