Re: [Htmlparser-user] Tags look up
Brought to you by:
derrickoswald
From: sebb <se...@gm...> - 2007-04-20 11:23:30
|
On 20 Apr 2007 02:30:14 -0000, Dipesh Sharma <dip...@re...> wrote: > > > Hi I'm trying to compare the html tag nodes of 2 different web pages by taking one node at a time. Hence, I need to compare the 1st node of the 2 web pages, then go to 2nd nodes and compare and so on. Could you plz help me how i can achieve this. I''v tried to use Node iterator but haven't been successfull. Attached is my code. > > The node comparison: if (e1.nextNode()==e2.nextNode()) will always be false, as that will only be true if they are identical Objects. You need to compare the relevant attributes of the node objects instead. I've not looked at the API, but perhaps that defines an equals() method that will work for you. If not, you will need to write your own comparison method. |