Package org.htmlparser.util

Examples of org.htmlparser.util.LinkProcessor


    public void test40() throws ParserException
    {
        assertEquals(
            "test40 failed",
            "http://a/b/c/g#s/../x",
            (new LinkProcessor()).extract("g#s/../x", baseURI));
    }
View Full Code Here


    public void test41() throws ParserException
    {
        assertEquals(
            "test41 failed",
            "http://a/b/c/g",
            (new LinkProcessor()).extract("http:g", baseURI));
    }
View Full Code Here

    public int countImageTagsWithHTMLParser() throws ParserException
    {
        Parser parser =
            new Parser("http://www.yahoo.com", new DefaultParserFeedback());
        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        int parserImgTagCount = 0;
        Node node;
        for (NodeIterator e = parser.elements(); e.hasMoreNodes();)
        {
            node = (Node) e.nextNode();
View Full Code Here

  public HTMLLinkProcessorTest(String name) {
    super(name);
  }

  protected void setUp() {
    lp = new LinkProcessor();
  }
View Full Code Here

  // ../.. = http://a/
  // ../../ = http://a/
  // ../../g = http://a/g

  public void test1() throws ParserException {
    assertEquals("test1 failed", "https:h", (new LinkProcessor()).extract("https:h", baseURI));
  }
View Full Code Here

  public void test1() throws ParserException {
    assertEquals("test1 failed", "https:h", (new LinkProcessor()).extract("https:h", baseURI));
  }

  public void test2() throws ParserException {
    assertEquals("test2 failed", "http://a/b/c/g", (new LinkProcessor()).extract("g", baseURI));
  }
View Full Code Here

  public void test2() throws ParserException {
    assertEquals("test2 failed", "http://a/b/c/g", (new LinkProcessor()).extract("g", baseURI));
  }

  public void test3() throws ParserException {
    assertEquals("test3 failed", "http://a/b/c/g", (new LinkProcessor()).extract("./g", baseURI));
  }
View Full Code Here

  public void test3() throws ParserException {
    assertEquals("test3 failed", "http://a/b/c/g", (new LinkProcessor()).extract("./g", baseURI));
  }

  public void test4() throws ParserException {
    assertEquals("test4 failed", "http://a/b/c/g/", (new LinkProcessor()).extract("g/", baseURI));
  }
View Full Code Here

  public void test4() throws ParserException {
    assertEquals("test4 failed", "http://a/b/c/g/", (new LinkProcessor()).extract("g/", baseURI));
  }

  public void test5() throws ParserException {
    assertEquals("test5 failed", "http://a/g", (new LinkProcessor()).extract("/g", baseURI));
  }
View Full Code Here

  public void test5() throws ParserException {
    assertEquals("test5 failed", "http://a/g", (new LinkProcessor()).extract("/g", baseURI));
  }

  public void test6() throws ParserException {
    assertEquals("test6 failed", "http://g", (new LinkProcessor()).extract("//g", baseURI));
  }
View Full Code Here

TOP

Related Classes of org.htmlparser.util.LinkProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.