public void run(){
try
{
MozillaParser parser = new MozillaParser();
String html = "<html><body>";
for (int i=0; i<100; i++)
html += "<li><table><tr><td>1111111111111111</table>\n";
html += "</body></html>";
Document document = parser.parse(html);
System.out.println("Generated document :" + ((org.dom4j.Document)document).asXML());
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("done...");
}
};
Thread thread2 = new Thread(){
public void run(){
try
{
//MozillaParser.initXPCOM(mozillaDistBinDirectory.getAbsolutePath());
MozillaParser parser = new MozillaParser();
System.out.println("parsing...");
String html = "<html><body>";
for (int i=0; i<100; i++)
html += "<li><table><tr><td>222222222222222</table>\n";
html += "</body></html>";
Document document = parser.parse(html);
System.out.println("Generated document :" + ((org.dom4j.Document)document).asXML());
}
catch (Exception e)
{
e.printStackTrace();