sitemap-generator
sitemap-generator copied to clipboard
xml from the example is not well formed
I ran the example code and generated the sitemap file, however when reading the file, I get this error
ExpatError: not well-formed (invalid token): line 56, column 109
It seems that this is due to the semicolon on this line
'<url><loc>https://www.haikson.com/my-projects/pynger/pynger-0-2/"http:/ask.com">ask.com</a></loc></url>'
Here is the code I ran
import xml.etree.ElementTree as ET
xml_data = open('sitemap.xml', 'r').read() # Read file
root = ET.XML(xml_data)