Hello!
I'm trying to use lol_html as an HTML parser to extract all content within an element, it's inner HTML. However I haven't figured out the right methods for this yet. Here is what I want to do, given the following HTML snippet:
<article id="main-content">
<div>
<p>foo</p>
</div>
</article>
I want to extract all the content within the element matching css selector article#main-content and store it in a String named content after this runs the value of content will be equal to:
I've what would be perfect would be a method on the element called get_inner_content() there seems to be all the methods for manipulating the inner content but not actually getting it such as:
set_inner_content
remove_and_keep_content
Maybe I'm thinking about this wrong, any help just getting the inner content of an element would be so hepful!