Thank you for this library! I'm curious to know if it's possible, for a large DOM tree, to more performantly access only the <head> of the page rather than unnecessarily parsing anything else.
I have code that is parsing a large page in full and then subsequently using xpath to access only the .//head/*, and I'm wondering if I can skip the unnecessary work of parsing the <body> using html5-parser or whether I'd need to look at a library that supports stream-parsing instead (which I don't believe this one does?).
Thank you for this library! I'm curious to know if it's possible, for a large DOM tree, to more performantly access only the
<head>
of the page rather than unnecessarily parsing anything else.I have code that is parsing a large page in full and then subsequently using xpath to access only the
.//head/*
, and I'm wondering if I can skip the unnecessary work of parsing the<body>
usinghtml5-parser
or whether I'd need to look at a library that supports stream-parsing instead (which I don't believe this one does?).