Re: use with Google App Engine
Andy Wickson <[email protected]>
| Newsgroups | gmane.comp.parsers.htmlparser.user |
|---|---|
| Message-ID | <[email protected]> |
For anyone having this problem in future, here is a workaround (exception
handling omitted):
// get the html 'the Google way'
URL url = new URL(TEST_URL);
BufferedReader reader = new BufferedReader(new
InputStreamReader(url.openStream()));
String line = null;
StringBuilder buf = new StringBuilder();
while ((line = reader.readLine()) != null) {
buf.append(line);
buf.append(System.getProperty ("line.separator"));
}
reader.close();
// use createPaser method that expects html string
Parser parser = Parser.createParser(buf.toString(), null);
StringBean sb = new StringBean ();
parser.visitAllNodesWith (sb);
return (sb.getStrings ());
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Htmlparser-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlparser-user