code: protected URL extractURL(Document doc) throws IOException {
      String url = doc.getFirstChild().getTextContent();
      return (null == url || "".equals(url)) ? null : new URL(url);
    }
docs: Extracts a URL from a document that consists of a URL only.
  @param doc
  @return the URL