How to grab HTML page and parse content to dig infomation you need ... in your xPages application ... in serverside using ’JQuery way’ ...

David Marko  12 March 2013 07:00:00
Have you ever known that jQuery has a server side alternative? What ... server side, I can hear ? What is this good for?  So have you ever request to grab data from web page, that is not JSON or any data orientated? I mean simple web page from which you need to grab some information and store it into your Lotus Notes database? If so and if you can code in JAVA ... the Jerry is your friend :-)

Jerry is JAVA library that mimics the JQuery API for accessing the HTML tags and attributes. Just imagine jQuery selector  $("div#jodd p.neat").css("color", "red")  but server side in your JAVA code. If you are interested in such things, the following URL http://jodd.org/doc/jerry/index.html  and screen can be a good starter for you.

Image:How to grab HTML page and parse content to dig infomation you need ... in your xPages application ... in serverside using ’JQuery  way’ ...
Comments

1Stephan H. Wissel  12.03.2013 14:19:01  How to grab HTML page and parse content to dig infomation you need ... in your xPages application ... in serverside using ’JQuery way’ ...

Interesting library. I wonder how it deals with all the crappy HTML you find in the Intertubes. So far I used htmlcleaner and Jericho ({ Link } Would be interesting to have a shootout

2Alan Hurt  12.03.2013 20:42:38  How to grab HTML page and parse content to dig infomation you need ... in your xPages application ... in serverside using ’JQuery way’ ...

Is this different from using the jQuery load command with a param to load a page fragment; then turning the fragment into an object - something like this?

$('#selector').load('{ Link } div#new_releases', function(response,status,xhr) {

$.each($(response), function(i,item){

console.log( $(this).text() );

});

});

3David Marako  13.03.2013 7:51:02  How to grab HTML page and parse content to dig infomation you need ... in your xPages application ... in serverside using ’JQuery way’ ...

Yes its completely server side thing where you do all processing ... for example in scheduled agent ...

TOPlist