Package org.htmlparser.tags

Examples of org.htmlparser.tags.LinkTag.children()


    LinkTag linkTag = (LinkTag) node[0];
    // Get the image tag from the link

    Node insideNodes[] = new Node[10];
    int j = 0;
    for (SimpleNodeIterator e = linkTag.children(); e.hasMoreNodes();) {
      insideNodes[j++] = (Node) e.nextNode();
    }
    assertEquals("Number of contained internal nodes", 1, j);
    assertTrue(insideNodes[0] instanceof ImageTag);
    ImageTag imageTag = (ImageTag) insideNodes[0];
View Full Code Here


    TableRow row = (TableRow) node[0];
    TableColumn col = row.getColumns()[1];
    Node node = col.children().nextNode();
    assertType("Node identified should be HTMLLinkTag", LinkTag.class, node);
    LinkTag linkTag = (LinkTag) node;
    Node nodeInsideLink = linkTag.children().nextNode();
    assertType("Tag within link should be an image tag", ImageTag.class, nodeInsideLink);
    ImageTag imageTag = (ImageTag) nodeInsideLink;
    assertStringEquals("Expected Image",
        "http://us.a1.yimg.com/us.yimg.com/a/co/columbiahouse/4for49Freesh_230x33_redx2.gif", imageTag
            .getImageURL());
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.