PhpWiki - Link Bean Links
Keywords: Link Bean Links, PhpWiki

Using a LinkBean to Extract Links

A LinkBean is a pretty easy way to get just the links:

    import java.net.URL;
    import org.htmlparser.beans.LinkBean;

    public class LinkDemo
    {
        public static void main (String[] args)
        {
            LinkBean lb = new LinkBean ();
            lb.setURL ("http://urlIWantToParse.com");
            URL[] urls = lb.getLinks ();
            for (int i = 0; i < urls.length; i++)
                System.out.println (urls[i]);
        }
    }

| Page Execution took 0.269 seconds