*/
public static void main (String[] args)
{
String url;
Parser parser;
NodeFilter filter;
NodeList list;
if (0 >= args.length)
{
url = (String)JOptionPane.showInputDialog (
null,
"Enter the URL to extract links from:",
"Web Site",
JOptionPane.PLAIN_MESSAGE,
null,
null,
"http://htmlparser.sourceforge.net/wiki/");
if (null == url)
System.exit (1);
}
else
url = args[0];
filter = new NodeClassFilter (LinkTag.class);
if ((1 < args.length) && args[1].equalsIgnoreCase ("-maillinks"))
filter = new AndFilter (
filter,
new NodeFilter ()
{
public boolean accept (Node node)
{
return (((LinkTag)node).isMailLink ());
}