Using HttpUnit without WebConversation and WebResponse

"Jesper Sahner" <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hi!

Normally when you use HttpUnit you use it like this:
WebConversation wc = new WebConversation();
WebResponse   resp = wc.getResponse( 
"http://www.httpunit.org/doc/cookbook.html" );
WebTable table = resp.getTables()[0];
...

Now say that you already have the response in e.g. a String (or a Stream of 
some kind) and just want to use the WebTable-part. How can the 
WebConversation- and the WebResponse-part be omitted and be replaced with 
e.g. a String?

Example:
String s="<html><table>...</table></html>";
WebTable table=...;

Regards,
Jesper




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.