I have an html which has tags as follows.
parent <li class="pro pic notSold" status="0" >
child <ul><li></li><ul>
parent <li class="pro pic soldOut" status="-1" >
child <ul><li></li><ul>
there are multiple parent
I tried, Elements indProducts = html.select(“li”); This was pulling even the child li. I dont want that.
I want to code such that if the
Yes, jSoup provides something similar to like. Check out this selector usage link.
You could try something like this:
Output = 2Note: Your
classstarting withpro picis too generic and will return the outermost parent (and also one inner child).