Why can I just delete parents or clear the root node in iterparse()?
The iterparse() implementation is based on the libxml2 parser. It requires the tree to be intact to finish parsing. If you delete or modify parents of the current node, chances are you modify the structure in a way that breaks the parser. Normally, this will result in a segfault. Please refer to the iterparse section of the lxml API documentation to find out what you can do and what you can’t do.
Related Questions
- In ActiveSync, if I clear the check box for a folder that has been synchronized to the mobile device, does that action delete the items from the Exchange server?
- How can I automatically delete/clear private data when exiting Mozilla Firefox?
- Why can I just delete parents or clear the root node in iterparse()?