Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

HTML list to R dataframe

$
0
0

I have the following example html code below. I would like to have a dataframe as follows. Thank you very much for any ideas

<a name="efficiant"></a><h3>Ingredient</h3>
<div id="product_detail"><ul>
<li>X1<ul>
<li>a</li>
<li>b</li>
<li>c</li>
</ul>
</li>
<li>X2<ul>
<li>a</li>
<li>b</li>
</ul>
</li>
<li>X3<ul>
<li>c</li>
<li>b</li>
</ul>
</li>
</ul>
</div>


column A    column B
   X1          a
   X1          b
   X1          c
   X2          a
   X2          b
   X3          c
   X3          b 

Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>