title: Get all content as string inside div
body: <p>I need to get all content inside an HTML element, including all child nodes and grandchild nodes and their content as if it was a string. This is my expected output:</p>
  <p><code>&lt;div class=&quot;images&quot;&gt;&lt;div class=&quot;img_100&quot;&gt;&lt;a class=&quot;img a&quot; legenda=&quot;&quot; target=&quot;&quot; style=&quot;&quot;&gt;&lt;img src=&quot;/img/site/570/b/random_image.jpg&quot; alt=&quot;Lorem ipsum - dolor sit amet&quot; class=&quot;portrait&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</code></p>
  <p>I am currently using JS with puppeteer to scrape the page I need, but I need all the HTML as string to format some content and I don't know how to get this the way I want.</p>
  <p>I also used this query <code>document.querySelectorAll(&quot;.page_content_post&quot;)</code> to get the parent element I want the content and child/grandchild nodes from.</p>
  <p>Thanks in advance.</p>