Java XML Attribute Get getAttribURL(Element ele, String name, URL docRoot)

Here you can find the source of getAttribURL(Element ele, String name, URL docRoot)

Description

get Attrib URL

License

Open Source License

Declaration

public static URL getAttribURL(Element ele, String name, URL docRoot) 

Method Source Code


//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;
        }
    }
}

Related

  1. getAttribBoolean(Element ele, String name)
  2. getAttribByName(Element node, String name)
  3. getAttribFloat(Element ele, String name)
  4. getAttribIntHex(Element ele, String name)
  5. getAttribString(Element ele, String name)
  6. getAttribute(Element aElement, String aAttr, String aDefault)
  7. getAttribute(Element e, String attName)
  8. getAttribute(Element e, String attribute)
  9. getAttribute(Element e, String attrName, String def)