Package de.mhus.lib.parser

Examples of de.mhus.lib.parser.HtmlParser


import junit.framework.TestCase;

public class HtmlParserTest extends TestCase {

  public void testParser() throws IOException {
    HtmlParser parser = new HtmlParser();
    parser.setTrim(true);
   
    HtmlListener listener = new HtmlListener();
   
    Reader in = new InputStreamReader( MSystem.locateResource(this, getClass().getSimpleName() + ".xml").openStream() );
   
    parser.parse(in, listener);
   
    assertTrue(listener.pi.getFirst().equals("xml version=\"1.0\" encoding=\"ISO-8859-1\""));
    assertTrue(listener.note.getFirst().equals("Edited"));
    assertTrue(listener.open.size() == listener.close.size());
    assertTrue(listener.single.size() == 1);
View Full Code Here

TOP

Related Classes of de.mhus.lib.parser.HtmlParser

Copyright © 2018 www.massapicom. 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.