Import xml data in django with libxml2

0

I need to import to xml the comments I have in the mysql database. To do so I use libxml2 library. It seems that the error is in showing the generated xml.

This would be the XML that generates

    asdf

views.py

        f = urllib2.urlopen(url)
        tree = ET.ElementTree(file=f)
        comentari_element = tree.getroot()
        comentaris = dict((e.tag, e.text) for e in comentari_element.getchildren() )

error

  

not well-formed (invalid token): line 21, column 124

    
asked by Gus 04.06.2017 в 17:00
source

0 answers