[Tutor] XML parsing when elements contain foreign characters
Stefan Behnel
stefan_ml at behnel.de
Thu Jan 9 15:56:30 CET 2014
Garry Bettle, 09.01.2014 09:50:
> I'm trying to parse some XML and I'm struggling to reference elements that
> contain foreign characters.
I skipped over Steven's response and he apparently invested quite a bit of
time in writing it up so nicely, so I can happily agree and just add one
little comment that you should generally avoid using MiniDOM for XML
processing. Instead, use the ElementTree library, which lives right next to
it in Python's standard library. It's a lot easier to use, and also
performs much better.
http://docs.python.org/library/xml.etree.elementtree.html
Stefan
More information about the Tutor
mailing list