\Header{startElement.SAX}{Generic Methods for SAX callbacks}
\alias{.InitSAXMethods}{startElement.SAX}
\alias{comment.SAX}{startElement.SAX}
\alias{endElement.SAX}{startElement.SAX}
\alias{entityDeclaration.SAX}{startElement.SAX}
\alias{processingInstruction.SAX}{startElement.SAX}
\alias{text.SAX}{startElement.SAX}
\keyword{file}{startElement.SAX}
\begin{Description}\relax
This is a collection of generic functions
for which one can write methods
so that they are called in repsonse to
different SAX events.
The idea is that one defines methods for different
classes of the \code{.state} argument
and dispatch to different methods based on that
argument.
The functions represent the different SAX events.
\end{Description}
\begin{Usage}
\begin{verbatim}
startElement.SAX(name, atts, .state = NULL)
endElement.SAX(name, .state = NULL)
comment.SAX(content, .state = NULL)
processingInstruction.SAX(target, content, .state = NULL)
text.SAX(content, .state = NULL)
entityDeclaration.SAX(name, base, sysId, publicId, notationName,  .state = NULL)
.InitSAXMethods(where = "package:XML")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{name}] the name of the XML element or entity being declared
\item[\code{atts}] 
\item[\code{content}] the value/string in the processing instruction or comment
\item[\code{target}] the target of the processing instruction, e.g. the R in
\code{<?R....>}
\item[\code{base}] x
\item[\code{sysId}] the system identifier for this entity
\item[\code{publicId}] the public identifier for the entity
\item[\code{notationName}] name of the notation specification
\item[\code{.state}] the state object on which the user-defined methods
should dispatch.
\item[\code{where}] the package in which the class and method definitions
should be defined. This is almost always unspecified.
\end{ldescription}
\end{Arguments}
\begin{Value}
Each method should return the (potentially modified)
state value.
\end{Value}
\begin{Note}\relax
This no longer requires the Expat XML parser to be installed.
Instead, we use libxml's SAX parser.
\end{Note}
\begin{Author}\relax
Duncan Temple Lang
\end{Author}
\begin{References}\relax
\url{http://www.w3.org/XML}, \url{http://www.xmlsoft.org}
\end{References}
\begin{SeeAlso}\relax
\code{\Link{xmlEventParse}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

\end{ExampleCode}
\end{Examples}

