title: how to print xpath parser
body: <p>I'm having some trouble in parsing lxml in Python 2.7 / Flask 0.12.</p>
  
  <p>I want to print parsed xpath data, but can't find a way to do it.
  Here's my code.</p>
  
  <pre><code>from lxml import html
  from lxml import etree
  
  def parse_html(html_src):
      target_xpath = //div[@class="primary-content"]//div[@class="mini-cart-product clearfix"]'
  
      detail_html = html.fromstring(html_src)
      page_tree = etree.ElementTree(detail_html)
  
      target_value_list = page_tree.xpath(target_xpath)
      #want to print 'target_value_list'
  
      return target_value_list
  </code></pre>
  
  <p>Here's html_src</p>
  
  <pre><code>&lt;div class="mini-cart-product clearfix"&gt;
      &lt;div class="mini-cart-image"&gt;
          &lt;a href="/carters-baby-boy-one-pieces/190795419986.html"&gt;&lt;img src="https://www.carters.com/dw/image/v2/AAMK_PRD/on/demandware.static/-/Sites-carters_master_catalog/default/dw540ec9a5/hi-res/127G525_Default.jpg?sw=470" alt="Neon Little Brother Jumpsuit" title="Neon Little Brother Jumpsuit"&gt;&lt;/a&gt;
          &lt;div class="mini-cart-brand"&gt;
              &lt;div class="carters"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="mini-cart-attributes"&gt;
          &lt;div class="product-name"&gt;
              &lt;a href="/carters-baby-boy-one-pieces/190795419986.html"&gt;Neon Little Brother Jumpsuit&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="attribute Size"&gt;
              &lt;span class="label"&gt;Size:&lt;/span&gt;
              &lt;span class="value"&gt;
          9M
          &lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="verticalLine"&gt;|&lt;/div&gt;
          &lt;div class="attribute Color"&gt;
              &lt;span class="label"&gt;Color:&lt;/span&gt;
              &lt;span class="value"&gt;
          Blue
          &lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="minicartpricedisplay"&gt;
              &lt;div class="price"&gt;
          &lt;span class="MSRP price-standard"&gt;
          &lt;span class="msrp"&gt;MSRP*:
          $14.00
          &lt;/span&gt;
          &lt;/span&gt;
                  &lt;span class="price-standard "&gt;$6.00&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="mini-cart-product clearfix"&gt;
      &lt;div class="mini-cart-image"&gt;
          &lt;a href="/carters-baby-boy-one-pieces/190795039832.html"&gt;&lt;img src="https://www.carters.com/dw/image/v2/AAMK_PRD/on/demandware.static/-/Sites-carters_master_catalog/default/dw182a85c8/hi-res/118H023_Default.jpg?sw=470" alt="Piqué Polo Romper" title="Piqué Polo Romper"&gt;&lt;/a&gt;
          &lt;div class="mini-cart-brand"&gt;
              &lt;div class="carters"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="mini-cart-attributes"&gt;
          &lt;div class="product-name"&gt;
              &lt;a href="/carters-baby-boy-one-pieces/190795039832.html"&gt;Piqué Polo Romper&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="attribute Size"&gt;
              &lt;span class="label"&gt;Size:&lt;/span&gt;
              &lt;span class="value"&gt;
          12M
          &lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="verticalLine"&gt;|&lt;/div&gt;
          &lt;div class="attribute Color"&gt;
              &lt;span class="label"&gt;Color:&lt;/span&gt;
              &lt;span class="value"&gt;
          Blue
          &lt;/span&gt;
          &lt;/div&gt;
          &lt;div class="minicartpricedisplay"&gt;
              &lt;div class="price"&gt;
          &lt;span class="MSRP price-standard"&gt;
          &lt;span class="msrp"&gt;MSRP*:
          $18.00
          &lt;/span&gt;
          &lt;/span&gt;
                  &lt;span class="price-standard desktopvisible"&gt;$7.20&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If I try to print 'target_value_list', then it prints a list of some memory addresses.
  Please somebody save me.</p>
  
  <p>I want to print what's in traget_value_list. Wanna know whether or not it has all the items in html_src.</p>