xmlParserCtxt
object as its first argument.
The resulting function can be passed to the
internal/native XML parser as a handler/callback function.
When the parser calls it, it recognizes this class information
and includes a reference to the C-level xmlParserCtxt
object as the first argument in the call.This xmlParserCtxt
object can be used to gracefull
terminate the parsing (without an error),
and in the future will also provide access to details
about the current state of the parser,
e.g. the encoding of the file, the XML version,
whether entities are being replaced,
line and column number for each node processed.
xmlParserContextFunction(f, class = "XMLParserContextFunction")
class
attribute of the function.f
whose class attribute has been prepended
with the value of class
.xmlInternalTreeParse
/xmlParse
and the branches
parameter of xmlEventParse
.