Lazy SAX XML parser with stop/resume

最后都变了- 提交于 2019-12-23 03:31:46

问题


I am pretty sure the answer is no but of course there are cleverer guys than me!

Is there a way to construct a lazy SAX based XML parser that can be stopped (e.g. raising an exception is a possible way of doing this) but also resumable ?

I am looking for a possible solution for Python >= 2.6 with standard XML libraries. The "lazy" part is also trivial: I am really after the "resumable" property here.


回答1:


Expat can be stopped and is resumable. AFAIK Python SAX parser uses Expat. Does the API really not expose the stopping stuff to the Python side??

EDIT: nope, looks like the parser stopping isn't available from Python...



来源:https://stackoverflow.com/questions/2059455/lazy-sax-xml-parser-with-stop-resume

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!