title: Finding and replacing XML/SVG element text by id with Python's lxml?
body: <p>I'm new to XML and lxml and would like to use SVG as graphics template and programatically replace some elements (labels in the image).
  For this, I have created an SVG file with Inkscape, however, lxml seems not to be able to handle the svg:namespaces used by Inkscape. Saving as plain SVG works:</p>
  
  <pre><code>from lxml import etree
  ifilename = "ifile.svg"
  with open( ifilename, 'r') as infile: 
      tree = etree.parse( infile )
  print tree.xpath("//text[@id='findme']/tspan/text()")
  </code></pre>
  
  <p>But I am not sure whether xpath is the right method to find an element at any position in the element tree!? I'd appreciate a nudge in the right direction.</p>