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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -