If I have HTML of the form
<ol>
<li>Cheeses
<ol>
<li>Red Leicester</li>
<li>Cheddar</li>
</ol>
<li>Wines
<ol>
<li>Burgundy</li>
<li>Beaujolais</li>
</ol>
</ol>
I would like to parse it into a structure something like
{"Cheeses":["Red Leicester", "Cheddar"], "Wines":["Burgundy", "Beaujolais"]}
There are many "tutorials" on how to use modules like HTML::TreeBuilder or Mojo::DOM to parse HTML, but they seem always to rely on using "id=" or "class=" tags. The HTML I want to parse does not have any ID tags or other attributes. How can I do this?