hello all, my question is the following, which is the best way of working XML (kml) with python?, especially script serializable.
thanks for your attention and answers
hello all, my question is the following, which is the best way of working XML (kml) with python?, especially script serializable.
thanks for your attention and answers
For Python and XML I routinely use xml.etree
(see its documentation). The good thing with xml.etree
is that it's included in the Python standard library. I've heard good things about lxml as well, which exposes an etree
compatible api.
lxml is very fast. With large data its best choice.
Edit: But "Note that lxml does not provide any thread-safety by itself (mainly for performance reasons), so you have to take care when you use parts of the API concurrently."
For very small and simple things, xml.dom.minidom
is the easiest route. If you're looking for something which can handle large files with very little memory usage then you'll want to use an xml.sax parser.