Examples of toPlainTextString()


Examples of org.htmlparser.RemarkNode.toPlainTextString()

            node[0] instanceof RemarkNode);
        RemarkNode remarkNode = (RemarkNode) node[0];
        assertEquals(
            "Plain Text of the remarkNode #1",
            " saved from url=(0022)http://internet.e-mail ",
            remarkNode.toPlainTextString());
        // The sixth node should be a HTMLRemarkNode
        assertTrue(
            "Sixth node should be a HTMLRemarkNode",
            node[5] instanceof RemarkNode);
        remarkNode = (RemarkNode) node[5];
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

    AnotherTag anotherTag = (AnotherTag)node;
    assertEquals("another tag children count",1,anotherTag.getChildCount());
    node = anotherTag.childAt(0);
    assertType("nested child",StringNode.class,node);
    StringNode text = (StringNode)node;
    assertEquals("text","Hello",text.toPlainTextString());
  }

  public void testCompositeTagWithTwoNestedTags() throws ParserException {
    createParser(
      "<Custom>" +
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

    AnotherTag anotherTag = (AnotherTag)node;
    assertEquals("another tag children count",1,anotherTag.getChildCount());
    node = anotherTag.childAt(0);
    assertType("nested child",StringNode.class,node);
    StringNode text = (StringNode)node;
    assertEquals("text","Hello",text.toPlainTextString());
  }
 
  public void testErroneousCompositeTag() throws ParserException {
    createParser("<custom>");
    CustomTag customTag = parseCustomTag(1);
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

    assertEquals("starting line position",1,customTag.tagData.getStartLine());
    assertEquals("ending line position",1,customTag.tagData.getEndLine());
    AnotherTag anotherTag = (AnotherTag)customTag.childAt(0);
    assertEquals("anotherTag child count",1,anotherTag.getChildCount());
    StringNode stringNode = (StringNode)anotherTag.childAt(0);
    assertStringEquals("anotherTag child text","something",stringNode.toPlainTextString());
    assertStringEquals(
      "first custom tag html",
      "<CUSTOM><ANOTHER>something</ANOTHER></CUSTOM>",
      customTag.toHtml()
    );   
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

            node[3] instanceof StringNode);
        StringNode stringNode = (StringNode) node[3];
        assertEquals(
            "First String Node",
            "This is the Title",
            stringNode.toPlainTextString());
        assertTrue(
            "Eighth Node identified must be a string node",
            node[7] instanceof StringNode);
        stringNode = (StringNode) node[7];
        assertEquals(
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

            node[7] instanceof StringNode);
        stringNode = (StringNode) node[7];
        assertEquals(
            "Second string node",
            "Hello World, this is the HTML Parser",
            stringNode.toPlainTextString());
    }

    public void testToHTML() throws ParserException
    {
        createParser("<HTML><HEAD><TITLE>This is the Title</TITLE></HEAD><BODY>Hello World, this is the HTML Parser</BODY></HTML>");
View Full Code Here

Examples of org.htmlparser.StringNode.toPlainTextString()

        assertType("first node", StringNode.class, node[0]);
        StringNode stringNode = (StringNode) node[0];
        assertStringEquals(
            "text",
            "Testing &\r\nRefactoring",
            stringNode.toPlainTextString());
    }

}
View Full Code Here

Examples of org.htmlparser.Text.toPlainTextString()

        createParser("<HTML><HEAD><TITLE>This is the Title</TITLE></HEAD><BODY>Hello World, this is the HTML Parser</BODY></HTML>");
        parser.setNodeFactory (new PrototypicalNodeFactory (true));
        parseAndAssertNodeCount(10);
        assertTrue("Fourth Node identified must be a string node",node[3] instanceof Text);
        Text stringNode = (Text)node[3];
        assertEquals("First String Node","This is the Title",stringNode.toPlainTextString());
        assertTrue("Eighth Node identified must be a string node",node[7] instanceof Text);
        stringNode = (Text)node[7];
        assertEquals("Second string node","Hello World, this is the HTML Parser",stringNode.toPlainTextString());
    }
View Full Code Here

Examples of org.htmlparser.Text.toPlainTextString()

        assertTrue("Fourth Node identified must be a string node",node[3] instanceof Text);
        Text stringNode = (Text)node[3];
        assertEquals("First String Node","This is the Title",stringNode.toPlainTextString());
        assertTrue("Eighth Node identified must be a string node",node[7] instanceof Text);
        stringNode = (Text)node[7];
        assertEquals("Second string node","Hello World, this is the HTML Parser",stringNode.toPlainTextString());
    }

    public void testToHTML() throws ParserException {
        createParser("<HTML><HEAD><TITLE>This is the Title</TITLE></HEAD><BODY>Hello World, this is the HTML Parser</BODY></HTML>");
        parser.setNodeFactory (new PrototypicalNodeFactory (true));
View Full Code Here

Examples of org.htmlparser.Text.toPlainTextString()

        createParser(text);
        parser.setNodeFactory (new PrototypicalNodeFactory (true));
        parseAndAssertNodeCount(1);
        assertType("first node",Text.class,node[0]);
        Text stringNode = (Text)node[0];
        assertStringEquals("text",text,stringNode.toPlainTextString());
    }

}
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.