xml
Class HtmlReferences

java.lang.Object
  extended by xml.HtmlReferences

public class HtmlReferences
extends Object

We use an html-parser to find all anchor tags in an html document that point to an additional reference. Calling the getHtmlReferences(java.io.File) returns a list of urls.


Nested Class Summary
static class HtmlReferences.Dump
          A class that reads an url page and dumps all references found to system out.
private static class HtmlReferences.HrefCallback
          A helper callback class that scans for href attributes in anchors.
 
Constructor Summary
HtmlReferences()
           
 
Method Summary
static List<URL> getHtmlReferences(File local)
          We parse a file for all hrefs.
static List<URL> getHtmlReferences(URL base)
          We parse an URL for all hrefs found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlReferences

public HtmlReferences()
Method Detail

getHtmlReferences

public static List<URL> getHtmlReferences(File local)
                                   throws IOException
We parse a file for all hrefs.

Throws:
IOException

getHtmlReferences

public static List<URL> getHtmlReferences(URL base)
                                   throws IOException
We parse an URL for all hrefs found.

Throws:
IOException