Examples of EndTag


Examples of org.htmlparser.tags.EndTag

     * This test just wants the text in the element
     */
    public void testWithoutParseParameter() throws ParserException
    {
        Tag tag;
        EndTag etag;
        StringNode snode;
        Node node = null;
        String testHTML =
            "<A href=\"http://www.iki.fi/kaila\" myParameter yourParameter=\"Kaarle\">Kaarle's homepage</A><p>Paragraph</p>";
        createParser(testHTML);
View Full Code Here

Examples of org.htmlparser.tags.EndTag

    * This test just wants the text in the element
    */
    public void testEmptyTagParseParameter() throws ParserException
    {
        Tag tag;
        EndTag etag;
        StringNode snode;
        Node node = null;
        String testHTML =
            "<INPUT name=\"foo\" value=\"foobar\" type=\"text\" />";

View Full Code Here

Examples of org.htmlparser.tags.EndTag

    {
        String endTagName = tag.getTagName();
        int endTagBegin = pos;
        int endTagEnd = endTagBegin + endTagName.length() + 2;
        endTag =
            new EndTag(
                new TagData(endTagBegin, endTagEnd, endTagName, currLine));
    }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

        int endTagBegin = possibleEndTagCauser.elementBegin();
        int endTagEnd = endTagBegin + endTagName.length() + 2;
        possibleEndTagCauser.setTagBegin(endTagEnd + 1);
        reader.addNextParsedNode(possibleEndTagCauser);
        endTag =
            new EndTag(
                new TagData(endTagBegin, endTagEnd, endTagName, currLine));
    }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

    private void doChildAndEndTagCheckOn(Node currentNode)
    {
        if (currentNode instanceof EndTag)
        {
            EndTag possibleEndTag = (EndTag) currentNode;
            if (isExpectedEndTag(possibleEndTag))
            {
                endTagFound = true;
                endTag = possibleEndTag;
                return;
View Full Code Here

Examples of org.htmlparser.tags.EndTag

    assertStringEquals(
      "first custom tag html",
      "<CUSTOM>something</CUSTOM>",
      customTag.toHtml()
    );
    EndTag endTag = (EndTag)node[2];
    assertStringEquals(
      "first custom tag html",
      "</CUSTOM>",
      endTag.toHtml()
    );
  }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

    assertType("firstChild",StringNode.class,firstChild);
    CompositeTag parent = firstChild.getParent();
    assertNotNull("first child parent should not be null",parent);
    assertSame("parent and custom tag should be the same",customTag,parent);
   
    EndTag endTag = (EndTag)node[2];
    assertStringEquals(
      "first custom tag html",
      "</CUSTOM>",
      endTag.toHtml()
    );
    assertNull(
      "end tag should have no parent",
      endTag.getParent()
    );

  }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

        // Register the image scanner
        parser.registerScanners();
        parseAndAssertNodeCount(2);
        // The node should be an HTMLLinkTag
        assertTrue("Node should be a HTMLEndTag", node[1] instanceof EndTag);
        EndTag endTag = (EndTag) node[1];
        assertEquals("Raw String", "</HTML>", endTag.toHtml());
    }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

    public void testEndTagFind()
    {
        String testHtml = "<SCRIPT>document.write(d+\".com\")</SCRIPT>";
        int pos = testHtml.indexOf("</SCRIPT>");
        EndTag endTag = (EndTag) EndTag.find(testHtml, pos);
        assertEquals("endtag element begin", 32, endTag.elementBegin());
        assertEquals("endtag element end", 40, endTag.elementEnd());
    }
View Full Code Here

Examples of org.htmlparser.tags.EndTag

        String currentLine)
    {
        // Replace tag - it was a <A> tag - replace with </a>
        String newLine = replaceFaultyTagWithEndTag(tag, currentLine);
        reader.changeLine(newLine);
        return new EndTag(
            new TagData(
                tag.elementBegin(),
                tag.elementBegin() + 3,
                tag.getTagName(),
                currentLine));
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.