title: HtmlElement not showing child nodes but HtmlElement.asXml() method does
body: <p>I have a web page from which I have saved in an HtmlPage object. I applied an XPath and its result is being stored in a list.</p>
  
  <pre><code>List&lt;?&gt; items = null;
  items = page.getByXPath("//div[contains(@class,'search-result-cards')]/div[contains(@class,'listContainer')]");
  </code></pre>
  
  <p>Now what I observed, is that when I iterate through these items, using HtmlElement, I get just the first line of the div tag which contains the class listContainer but not its child nodes. However, on using he.asXml() method, I get the complete information about the subnodes as well.</p>
  
  <pre><code>for(HtmlElement he : (List&lt;HtmlElement&gt;) items)
  {
      br.write("Printing just the element ::: "+he);
      br.write(he.asXml());
  }
  </code></pre>
  
  <p>Here, <code>br</code> is a BufferedWriter object which is being used to write the output to the file.
  The issue is that I want all this information which is coming after I'm calling <code>he.asXml()</code> method in the HtmlElement object only. Is it possible? I tried typecasting directly a string to HtmlElement Object which didn't work. Can anyone please help?</p>
  
  <pre><code>Output
  Printing just the element ::: HtmlDivision[&lt;div class="listContainer" data-ptitle="3139847000" data-reactid="402"&gt;]
  
  he.asXml() Output
  &lt;div class="listContainer" data-ptitle="3139847000" data-reactid="402"&gt;
  &lt;div class="imageContainer" data-reactid="403"&gt;
  &lt;div class="prodInfoContainer" data-reactid="406"&gt;
  .
  .
  .
  </code></pre>
  
  <p>The dots represents these nodes keep on going, as the output is very large.
  Let me know if any other information is needed that I may have not mentioned.</p>