
This adds an XML plug-in based on the documentation an defusedxml. Change-Id: Id775cd0f3d45fd2e9dac1c5bca5c36e0b5618066
11 lines
344 B
Python
11 lines
344 B
Python
import xml.dom.expatbuilder as bad
|
|
import defusedxml.expatbuilder as good
|
|
|
|
bad.parse('filethatdoesntexist.xml')
|
|
good.parse('filethatdoesntexist.xml')
|
|
|
|
xmlString = "<note>\n<to>Tove</to>\n<from>Jani</from>\n<heading>Reminder</heading>\n<body>Don't forget me this weekend!</body>\n</note>"
|
|
|
|
bad.parseString(xmlString)
|
|
good.parseString(xmlString)
|