I think this question has been asked, but I not found anything.
From the Document element in Jsoup, how I can traverse for all elements in the HTML content?
I was reading the documentation and I was thinking about using the childNodes() method, but it only takes the nodes from one leval below (what I understand). I think I can use some recursion with this method, but I want to know if there is a more appropriate/native way to do this.
From
Document(and anyNodesubclass), you can use thetraverse(NodeVisitor)method.For example: