[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    [Htmlunit-user]  Parse web page to get data
From:       albertkao <albertkao3 () gmail ! com>
Date:       2011-04-23 2:04:34
Message-ID: 31459844.post () talk ! nabble ! com
[Download RAW message or body]


I like to get the data containing the "myUrl=hw" from the web page
"http://www.gnpcb.org/esv/search/?q=Romans+1"
i.e. the value I am looking for is
"myUrl=hw%2F45001001-45001032"
What should be the "page.asXXX()" be?

[code]
public class EsvRomansTest {
	@Test
	public void homePage() throws Exception {
	    final WebClient webClient = new WebClient();
	    final HtmlPage page =
webClient.getPage("http://www.gnpcb.org/esv/search/?q=Romans+1");

	    final String pageAsText = page.asText();
	    System.out.println("pageAsText\n" + pageAsText + "\n");

            // final String data = page.asXXX();
	    webClient.closeAllWindows();
	}
}
[/code]

-- 
View this message in context: http://old.nabble.com/Parse-web-page-to-get-data-tp31459844p31459844.html
Sent from the HtmlUnit - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
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