Examples of toHtml()


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

        assertEquals("Link Text", "This is a test\r\n", linkTag.getLinkText());
        // Verify the reconstruction html
        assertStringEquals(
            "toHTML()",
            "<A HREF=\"s/8741\"><IMG BORDER=\"0\" WIDTH=\"16\" SRC=\"http://us.i1.yimg.com/us.yimg.com/i/i16/mov_popc.gif\" HEIGHT=\"16\">This is a test\r\n</A>",
            linkTag.toHtml());
    }

    public void testEvaluate()
    {
        LinkScanner scanner = new LinkScanner("-l");
View Full Code Here

Examples of org.htmlparser.tags.MetaTag.toHtml()

            "Protecting the internet community through technology, not legislation.  SpamCop eliminates spam.  Automatically file spam reports with the network administrators who can stop spam at the source.  Subscribe, and filter your email through powerful statistical analysis before it reaches your inbox.",
            metaTag.getMetaContent());
        assertStringEquals(
            "toHTML()",
            "<META CONTENT=\"Protecting the internet community through technology, not legislation.  SpamCop eliminates spam.  Automatically file spam reports with the network administrators who can stop spam at the source.  Subscribe, and filter your email through powerful statistical analysis before it reaches your inbox.\" NAME=\"description\">",
            metaTag.toHtml());
    }
}
View Full Code Here

Examples of org.htmlparser.tags.OptionTag.toHtml()

        OptionTag OptionTag;
        OptionTag = (OptionTag) node[0];
        assertStringEquals(
            "HTML String",
            "<OPTION VALUE=\"Google Search\">Google</OPTION>",
            OptionTag.toHtml());
        OptionTag = (OptionTag) node[1];
        assertStringEquals(
            "HTML String",
            "<OPTION VALUE=\"AltaVista Search\">AltaVista</OPTION>",
            OptionTag.toHtml());
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        ScriptTag scriptTag = (ScriptTag) node[0];
        assertStringEquals(
            "Expected Script Code",
            "document.write(d+\".com\")",
            scriptTag.getScriptCode());
        assertStringEquals("script tag html", testHtml, scriptTag.toHtml());
    }

    /**
     * Bug reported by Gordon Deudney 2002-03-27
     * Upon parsing :
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        createParser(testHtml);

        parser.addScanner(new ScriptScanner("-s"));
        parseAndAssertNodeCount(1);
        ScriptTag scriptTag = (ScriptTag) node[0];
        assertStringEquals("scriptag html", testHtml, scriptTag.toHtml());
    }

    /**
     * Duplicates bug reported by James Moliere - whereby,
     * if script tags are generated by script code, the parser
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        // Check the data in the applet tag
        ScriptTag scriptTag = (ScriptTag) node[0];
        assertEquals(
            "Expected Raw String",
            "<SCRIPT>document.write(d+\".com\")</SCRIPT>",
            scriptTag.toHtml());
    }

    /**
    * Bug check by Wolfgang Germund 2002-06-02
    * Upon parsing :
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        // Check the data in the applet tag
        ScriptTag scriptTag = (ScriptTag) node[1];
        assertStringEquals(
            "Expected Script Code",
            expectedHTML,
            scriptTag.toHtml());
    }

    public void testParamExtraction() throws ParserException
    {
        StringBuffer sb1 = new StringBuffer();
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        assertTrue("Node should be a script tag", node[0] instanceof ScriptTag);
        ScriptTag scriptTag = (ScriptTag) node[0];
        assertStringEquals(
            "Script toHTML()",
            "<SCRIPT LANGUAGE=\"javascript\">\r\nvar lower = '<%=lowerValue%>';\r\n</SCRIPT>",
            scriptTag.toHtml());
    }

    public void testSingleApostropheParsingBug() throws ParserException
    {
        StringBuffer sb1 = new StringBuffer();
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag.toHtml()

        assertTrue("Node should be a script tag", node[0] instanceof ScriptTag);
        ScriptTag scriptTag = (ScriptTag) node[0];
        assertStringEquals(
            "Script toHTML()",
            "<SCRIPT SRC=\"<%=sourceFileName%>\"></SCRIPT>",
            scriptTag.toHtml());
    }

}
View Full Code Here

Examples of org.htmlparser.tags.StyleTag.toHtml()

        assertTrue(node[0] instanceof StyleTag);
        StyleTag styleTag = (StyleTag) node[0];
        assertEquals(
            "Raw String",
            "<STYLE>a.h{background-color:#ffee99}</STYLE>",
            styleTag.toHtml());
    }

    /**
     * Reproducing a bug reported by Dhaval Udani relating to
     * style tag attributes being missed
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.