if table.remove(self._stack) ~= tag.name then
err(self, string.format("%s (/%s)", self._errstr.unmatchedTagErr, tag.name), f.pos)
end
should be moved outside of the fexists check so that the parser will still pop the stack properly.
(For context as to why a handler wouldn't implement endtag, I'm writing a handler to extract only the text nodes out of an XML document for my application)
Sorry for the late reply.
In fact, the endtag() performs some additional processing, being a required function and the parsing doesn't work without it.
Try to explain your use case to see if I can help.
Attempting to use a handler without an "endtag" method fails to pop the stack and results in an "Incomplete XML Document" error.
This line
should be moved outside of the
fexists
check so that the parser will still pop the stack properly.(For context as to why a handler wouldn't implement endtag, I'm writing a handler to extract only the text nodes out of an XML document for my application)