How to differentiate two HTML elements with same tagname and same text -
i know there method in jsoup tells me element same tag name, text , class (if any) different other element same tag name, text , same class (if any). clarification consider following html snippet :
<html> <body> <div>here am</div><div>first time</div> <div>here am</div><div>again</div> </body> </html>
now in above code how can separate 2 elements div tag , text here am. note here 2 elements have no id.
the above example simple actual scenario may more complex. if kindly suggest me generalized answer grateful. thank you.
give id making unique document. can done as
<div id="first">here am</div> <div id="second">here am</div>
Comments
Post a Comment