[prev in list] [next in list] [prev in thread] [next in thread]
List: htmlunit-user
Subject: Re: [Htmlunit-user] get raw html without parsing
From: Marc Guillemot <mguillemot () yahoo ! fr>
Date: 2011-09-26 13:06:05
Message-ID: 4E8078BD.9070707 () yahoo ! fr
[Download RAW message or body]
Hi,
you could use your own WebConnection (wrapping the original one) and
returning for instance some empty content in place of the original one
if your check don't pass.
Cheers,
Marc.
--
HtmlUnit support & consulting from the source
Blog: http://mguillem.wordpress.com
Le 16/09/2011 06:45, Robert Servensen a écrit :
> So it's not possible to delay parsing?
>
>
> -----------------
>
> Hi Robert,
>
> Parsing happens automatically, and your code correctly gets the raw HTML
> content.
>
> Yours, Ahmed
>
> ---- Blog: http://asashour.blogspot.com
>
> ________________________________ From: Robert Servensen
> <rser...@gmail.com> To: html...@lists.sourceforge.net Sent: Friday,
> September 16, 2011 6:39 AM Subject: [Htmlunit-user] get raw html
> without parsing
>
> I'm trying to get the raw html without having the webClient do any parsing. Only
> if the raw HTML passes some checks that I will do manually do I want the parsing
> to happen.
>
> Is it possible? Is this the right way to do it?
>
> final HtmlPage page = webClient.getPage( myURLstring ); final
> String pageString = page.getWebResponse().getContentAsString();
>
> More specifically, does the first instance of a command like page.getByXPath
> cause the parsing to happen, or is it done immediately in the getPage call?
>
> Thank you.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic