parse html based on distance between two elements
I am trying to do some html parsing.
I am dealing with some very dynamic data, and my sources vary widely.
If to be more specific, I am trying to parse product information, including
name, price and description from pages that I do not know in advance.

Throughout these pages, the only basic information the stays the same is the title of the page
the name of them item I am querying (they both match each other) and the price.
The only real logic that remains the same throughout different websites is the 
proximity between the different sets of information.
So, a price label will be close to the product's name and close to its description.

I am looking for an html parser that will give me the ability to narrow down my parsing based on the distance in pixels between the different html tags.

Do you know of such a library? 
Is there any other way I could try to tackle this issue?

parse html based on distance between two elements
===

I am trying to do some html parsing.
I am dealing with some very dynamic data, and my sources vary widely.
If to be more specific, I am trying to parse product information, including
name, price and description from pages that I do not know in advance.

Throughout these pages, the only basic information the stays the same is the title of the page
the name of them item I am querying (they both match each other) and the price.
The only real logic that remains the same throughout different websites is the 
proximity between the different sets of information.
So, a price label will be close to the product's name and close to its description.

I am looking for an html parser that will give me the ability to narrow down my parsing based on the distance in pixels between the different html tags.

Do you know of such a library? 
Is there any other way I could try to tackle this issue?
