Actually how to parse the html table `
<tr> <th colspan="3">h1:1</th> <th colspan="2">h1:2</th> </tr> <tr> <th colspan="2">h2:1</th> <th>4</th> <th colspan="2">h2:2</th> </tr> <tr> <th>h3:1</th> <th>h3:2</th> <th>h3:3</th> <th>h3:4</th> <th>h3:5</th> </tr> <tr> <td>a1</td> <td>a2</td> <td>a3</td> <td>a4</td> <td>a5</td> </tr> <tr> <td>b1</td> <td>b2</td> <td>b3</td> <td>b4</td> <td>b5</td> </tr> </table> Keeping the relation of parental headers to children, and the relation of child headers (which already become the parent of the table body) to the elements of the table body without lambda expressions? For reference - it will go to Jason and will take about the following form
{"table":[ {"Line 0":[ {"h1:1":[{"h2:1":[{"h3:1":"a1"}, {"h3:2":"a2"}]}, {"h2:2":[{"h3:3":"a3"}]}]}, {"h1:2":[{"h2:3":[{"h3:4":"a4"}, {"h3:5":"a5"}]}]} ]}, {"Line 1":[ {"h1:1":[{"h2:1":[{"h3:1":"b1"}, {"h3:2":"b2"}]}, {"h2:2":[{"h3:3":"b3"}]}]}, {"h1:2":[{"h2:3":[{"h3:4":"b4"}, {"h3:5":"b5"}]}]} ]} ]} At the same time, the tables can be of very different variability at the expense of headings, and we need a universal class that could extract such an adequate Jason, for the second week I have been breaking my brain. I work with jsoup however, it turns out that for the first th there is no th child element, if you take the html markup, but it is visually perceived that it is ... I think that with some divs I can make a new dom format so that was it easier to build the right dependencies between the headers in jason?