\HeaderA{validatePSIMI25}{Validating PSI-MI 2.5 file with MIF25 XML schema}{validatePSIMI25}
\keyword{models}{validatePSIMI25}
\begin{Description}\relax
The function validates given PSI-MI 2.5 file with MIF25 XML schema
provided by the Molecular Interactions Workgroup of HUPO Proteomics Standards Initiative
\end{Description}
\begin{Usage}
\begin{verbatim}
validatePSIMI25(file,
schema = system.file("extdata/schemas/MIF25.xsd", package = "RpsiXML"),
ignore.stderr = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] The name or the URL of the file to be validated 
\item[\code{schema}] The schema file of PSI-MI 2.5 file format by default 
\item[\code{ignore.stderr}] Whether to print out errors in the console 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
We advice to set "ignore.stderr=FALSE" for the first time of
validating. The error number of the file will be printed in the
console. When the number is not 0, one can set "ignore.stderr=TRUE"
and see the errors produced during the validation.
\end{Details}
\begin{Value}
The number of errors in validating the file
\end{Value}
\begin{Note}\relax
This function sofar depends on the tool "xmllint" bundled with libxml2
library. We plan to compile it later to run independent of the tool.
\end{Note}
\begin{Author}\relax
Jitao David Zhang <j.zhang@dkfz.de>, Tony Chiang <tchiang@ebi.ac.uk>
\end{Author}
\begin{References}\relax
libxml2 library \url{http://xmlsoft.org/}
PSI-MI 2.5 XML schema \url{http://psidev.sourceforge.net/mi/rel25/src/MIF25.xsd}
\end{References}
\begin{Examples}
\begin{ExampleCode}
okFile <- system.file("extdata/psi25files/intact_2008_test.xml",
                      package="RpsiXML")
validatePSIMI25(okFile)
\end{ExampleCode}
\end{Examples}

