\Header{xmlContainsEntity}{Checks if an entity is defined within a DTD.}
\alias{xmlContainsElement}{xmlContainsEntity}
\keyword{file}{xmlContainsEntity}
\begin{Description}\relax
A DTD contains entity and element definitions.
These functions test whether a DTD contains a definition
for a particular named element or entity.
\end{Description}
\begin{Usage}
\begin{verbatim}
xmlContainsEntity(name, dtd)
xmlContainsElement(name, dtd)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{name}] The name of the element
or entity being queried.
\item[\code{dtd}] The DTD in which to search for the entry.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
See \code{\Link{parseDTD}} for more information about
DTDs, entities and elements.
\end{Details}
\begin{Value}
A logical value indicating whether the entry
was found in the appropriate list of 
entitiy or element definitions.
\end{Value}
\begin{Author}\relax
Duncan Temple Lang
\end{Author}
\begin{References}\relax
\url{http://www.w3.org/XML}, \url{http://www.jclark.com/xml},
\url{http://www.omegahat.org}
\end{References}
\begin{SeeAlso}\relax
\code{\Link{parseDTD}},
\code{\Link{dtdEntity}},
\code{\Link{dtdElement}},
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 dtdFile <- system.file("exampleData", "foo.dtd", package="XML")
 foo.dtd <- parseDTD(dtdFile)
 
  # Look for entities.
 xmlContainsEntity("foo", foo.dtd)
 xmlContainsEntity("bar", foo.dtd)

  # Now look for an element
 xmlContainsElement("record", foo.dtd)
\end{ExampleCode}
\end{Examples}

