text: from xml.etree.ElementTree import Element, SubElement, Comment
  from xml.etree import ElementTree
  from xml.dom import minidom
  import datetime
  
  def prettify(elem):
      """Return a pretty-printed XML string for the Element.
      """
      rough_string = ElementTree.tostring(elem, 'utf-8')
      reparsed = minidom.parseString(rough_string)
      return reparsed.toprettyxml(indent="  ")
  
  top = Element('szamlak')
  comment = Comment('23_2014 számlaséma alapján')
  top.append(comment)
  export_datuma = SubElement(top, "export_datuma")
  export_datuma.text = str(datetime.date.today())
  
  child = SubElement(top, 'child')
  child.text = 'This child contains text.'
  
  child_with_tail = SubElement(top, 'child_with_tail')
  child_with_tail.text = 'This child has regular text.'
  child_with_tail.tail = 'And "tail" text.'
  
  child_with_entity_ref = SubElement(top, 'child_with_entity_ref')
  child_with_entity_ref.text = 'This &that'
  
  #print (tostring(top))
  print (prettify(top))
  ElementTree.ElementTree(top).write("elementree.xml")