\HeaderA{xclass}{(Advanced) Construct R objects from XML document queries}{xclass}
\keyword{manip}{xclass}
\begin{Description}\relax
This function takes an xml object, created from \code{\LinkA{readXml}{readXml}},
and an xpath query referencing an element of the document,and returns
an R object represneting the element.

The xpath query must retrive an element, not an attribute.
\end{Description}
\begin{Usage}
\begin{verbatim}
xclass(doc, xpathq, prefix = character(0))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{doc}] An \code{XMLInternalDocument} retrieved using
\code{\LinkA{readXml}{readXml}}.
\item[\code{xpathq}] A length-1 character string representing an xpath query
into the document.
\item[\code{prefix}] A prefix used to map, when necessary, between the XML
class name and the corresponding R class. For \code{NetAffx}-based
classes, the prefix is \sQuote{Affx}; no prefix is required for DTT
or ARR documents.
\end{ldescription}
\end{Arguments}
\begin{Value}
An R object corresponding to the class(es) referenced by the xpath
query.
\end{Value}
\begin{Author}\relax
Martin Morgan
\end{Author}
\begin{References}\relax
\url{http://www.w3.org/TR/xpath} provides a very useful description of
xpath. Addiitonal references are in the vignette `Retrieving MAGE and
ARR sample attributes'.
\end{References}
\begin{SeeAlso}\relax
The vignettes `Retrieving MAGE and ARR sample attributes' and
`Annotation retrieval with NetAffxResource' for detailed illustration
of use.

\code{\LinkA{readXml}{readXml}} for appropriately reading XML documents.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
example(readXml)
\end{ExampleCode}
\end{Examples}

