Hello. There is a page, example:
<div> <div></div>(1) <div> <div></div>(2) </div>(3) </div>
I selected the first div element. How do I get items 1 and 3, while ignoring 2?
Elements resultDivs = doc.select("div.content.main" > div");
final Stream<Element> stream = doc.getElementsByTag("div").stream(); stream.forEach(element -> { //проверка на контекст }
Source: https://ru.stackoverflow.com/questions/535873/More articles:How to Qt from QLineEdit to pull out the value of a specific positionHow to create a convolutional neural network in Python + PyBrain? [closed]Problem with policy file between AS3 and Java serverCalling a method for an unknown WinForm elementHow to install GridView below AppBarLayoutSetting the console font program CodeBlocksBuilding a custom grid on flexCompare two listBoxjavascript classesHow to set hashmap in ArrayAdapter?All Articles
Elements resultDivs = doc.select("div.content.main" > div");will not work? - Alexey Shimansky