Message161762
| Author |
eli.bendersky |
| Recipients |
Frederick.Ross, eli.bendersky, eric.araujo, ezio.melotti, pitrou, r.david.murray, rhettinger |
| Date |
2012年05月28日.09:41:29 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1338198090.94.0.592711265564.issue14852@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I don't think this is an enhancement to ET, because ET was not designed to be a streaming parser, which is what is required here. ET was designed to read a whole valid XML document. There is 'iterparse', as Antoine mentioned, but it is designed to "track changes to the tree while it is being built" - mostly to save memory.
You have streaming XML parsers in Python - for example xml.sax. You can also relatively easily use xml.sax to find the end of your document and then parse the buffer with ET.
I don't see how a comparison with Parsec (a parser generator/DSL library) makes sense. There are tons of such libraries for Python - just pick one. |
|