title: Incredibly basic lxml questions: getting HTML/string content of lxml.etree._Element?
body: <p>This is such a basic question that I actually can't find it in the docs :-/</p>
  
  <p>In the following:</p>
  
  <pre><code>img = house_tree.xpath('//img[@id="mainphoto"]')[0]
  </code></pre>
  
  <p>How do I get the HTML of the <code>&lt;img/&gt;</code> tag?</p>
  
  <p>I've tried adding <code>html_content()</code> but get <code>AttributeError: 'lxml.etree._Element' object has no attribute 'html_content'</code>.</p>
  
  <p>Also, it was a tag with some content inside (e.g. <code>&lt;p&gt;text&lt;/p&gt;</code>) how would I get the content (e.g. <code>text</code>)?</p>
  
  <p>Many thanks!</p>