title: How can I include a link to XSLT file with Python ElementTree?
body: <p>I'm trying hard to include my XSLT header in my XML with ElementTree, and I can´t find any information on how to do it.</p>
  
  <p>Here's my Python code: </p>
  
  <pre><code>tree = ET.parse('myfile.xml') #get all tags from this XML document
  
  root = tree.getroot()  #get all elements from each tag
  
  root[0][0].text = "ole"
  
  root[0][1].text = "ole"
  
  tree.write('test_file.xml', encoding='utf-8', method="xml") #write XML file
  </code></pre>
  
  <p>The only problem is to include this header:</p>
  
  <p><code>&lt;\? xml-stylesheet type="text/xsl" href="myfile.xsl"  \?&gt;</code></p>