Examples of JspScanner


Examples of org.htmlparser.scanners.JspScanner

   */
  public void testScan() throws ParserException {
    createParser("<h1>\n" + "This is a <%=object%>\n" + "</h1>");

    // Register the Jsp Scanner
    parser.addScanner(new JspScanner("-j"));
    parseAndAssertNodeCount(4);
    // The first node should be an HTMLJspTag
    assertTrue("Third should be an HTMLJspTag", node[2] instanceof JspTag);
    JspTag tag = (JspTag) node[2];
    assertEquals("tag contents", "=object", tag.getText());
View Full Code Here

Examples of org.htmlparser.scanners.JspScanner

        + "int indexs = value.indexOf(\"<A HREF=\");\n" + "int indexe = value.indexOf(\">\");\n"
        + "if (indexs != -1) {\n" + "return value.substring(indexs+9,indexe-2);\n" + "}\n" + "return value;\n"
        + "}\n" + "%>\n");
    Parser.setLineSeparator("\r\n");
    // Register the Jsp Scanner
    parser.addScanner(new JspScanner("-j"));
    parseAndAssertNodeCount(1);
  }
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.