2 ms·
ElementTree is in the stdlib. It isn't slow and has incremental parsing and so on. It's also a nice API for dealing with XML.
by maxerickson 8y ago
ElementTree is in the stdlib. It isn't slow and has incremental parsing and so on.
It's also a nice API for dealing with XML.
- UncleEntity 8y ago> ElementTree is in the stdlib. It isn't slow and has incremental parsing and so on. I had enough trouble using it efficiently that I went and wrapped Boost property tree[0] and can happily churn out all sorts of data queries (including calling into python for the sorting function from the C++ lib) in almost no time. I was taking daily(ish) updates of an rss feed and appending it to a master rss file but sorting was pretty slow using list comprehensions so now I convert it automagically to json and append it as is. No more list comprehensions either, just hand it a lambda and it outputs a sorted C++ iterator. Though I probably should've just thrown the data into a database and learned SQL like a normal person... [0] https://github.com/eponymous/python3-property_tree https://github.com/eponymous/python3-property_tree