https://github.com/cran/XML
Raw File
Tip revision: c63073887a999d860870b00ba90b71bcd63b86ae authored by Duncan Temple Lang on 13 September 2011, 00:00:00 UTC
version 3.4-3
Tip revision: c630738
xmlParserContextFunction.Rd
\name{xmlParserContextFunction}
\alias{xmlParserContextFunction}
\title{Identifies function as expecting an xmlParserContext argument}
\description{
 This is a convenience function for setting the class of the
specified function to include "XMLParserContextFunction".
This identifies it as expecting an 
\code{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 \code{xmlParserCtxt} 
object as the first argument in the call.

This \code{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.
}
\usage{
 xmlParserContextFunction(f, class = "XMLParserContextFunction")
}
\arguments{
  \item{f}{the function whose class information is to be augmented.}
  \item{class}{the name of the class which is to be added to the \code{class}
    attribute of the function.}
}
\value{
 The function object \code{f} whose class attribute has been prepended
  with the value of \code{class}.
}
\author{Duncan Temple Lang}
\seealso{
 \code{\link{xmlInternalTreeParse}}/\code{\link{xmlParse}}
and the \code{branches} parameter of  \code{\link{xmlEventParse}}.
}
\examples{
}
\keyword{IO}
\keyword{programming}
\concept{XML}

back to top