Package org.htmlparser.scanners

Examples of org.htmlparser.scanners.LinkScanner.insertEndTagBeforeNode()


    public void testInsertEndTagBeforeTag() throws ParserException
    {
        String currentLine = "<a href=s/7509><b>Yahoo! Movies</b></a>";
        Tag tag = new Tag(new TagData(0, 14, "a href=s/7509", currentLine));
        LinkScanner linkScanner = new LinkScanner();
        String newLine = linkScanner.insertEndTagBeforeNode(tag, currentLine);
        assertEquals(
            "Expected insertion",
            "</A><a href=s/7509><b>Yahoo! Movies</b></a>",
            newLine);
    }
View Full Code Here


  public void testInsertEndTagBeforeTag() throws ParserException {
    String currentLine = "<a href=s/7509><b>Yahoo! Movies</b></a>";
    Tag tag = new Tag(new TagData(0, 14, "a href=s/7509", currentLine));
    LinkScanner linkScanner = new LinkScanner();
    String newLine = linkScanner.insertEndTagBeforeNode(tag, currentLine);
    assertEquals("Expected insertion", "</A><a href=s/7509><b>Yahoo! Movies</b></a>", newLine);
  }

  /**
   * A bug in the freshmeat page - really bad html tag -
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.