Ever tried `lxml’s` `cssselect`? It’s way more intuitive than XPath for simple stuff. Just `pip install cssselect` and boom, jQuery-like syntax.
For huge files, `iterparse` + `yield` is your friend. Also, avoid `//` in XPath—it’s slow AF. Be specific!
Namespaces? Yeah, they suck. I usually brute-force it with `*[contains(name(), ':'))]` until it works.
For huge files, `iterparse` + `yield` is your friend. Also, avoid `//` in XPath—it’s slow AF. Be specific!
Namespaces? Yeah, they suck. I usually brute-force it with `*[contains(name(), ':'))]` until it works.
