3 ms·
That link has some bizarre misconceptions about namespaces (just define the namespace URLs you’re interested in as constants, don’t depend on the particular sho
by mercutio2 9y ago
That link has some bizarre misconceptions about namespaces (just define the namespace URLs you’re interested in as constants, don’t depend on the particular short name/URL map you expect, as that guy does).
It also looks like it predates cElementTree, which has an identical API but is vastly faster.
But anyway, yes, iterparse will be much more reliable/flexible than a regular expression search of non-canonical XML data, and will likely be faster, too.