\subsection{printxml}
\label{labprintxml}
\noindent Name: \textbf{printxml}\\
\phantom{aaa}prints an expression as an MathML-Content-Tree\\[0.2cm]
\noindent Library names:\\
\verb|   void sollya_lib_printxml(sollya_obj_t)|\\
\verb|   void sollya_lib_printxml_newfile(sollya_obj_t, sollya_obj_t)|\\
\verb|   void sollya_lib_printxml_appendfile(sollya_obj_t, sollya_obj_t)|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{printxml}(\emph{expr}) : \textsf{function} $\rightarrow$ \textsf{void}\\
\textbf{printxml}(\emph{expr}) $>$ \emph{filename} : (\textsf{function}, \textsf{string}) $\rightarrow$ \textsf{void}\\
\textbf{printxml}(\emph{expr}) $>$ $>$ \emph{filename} : (\textsf{function}, \textsf{string}) $\rightarrow$ \textsf{void}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{expr} represents a functional expression
\item \emph{filename} represents a character sequence indicating a file name
\end{itemize}
\noindent Description: \begin{itemize}

\item The command \textbf{printxml} is now considered DEPRECATED in \sollya.

\item \textbf{printxml}(\emph{expr}) prints the functional expression \emph{expr} as a tree of
   MathML Content Definition Markups. This XML tree can be re-read in
   external tools or by usage of the \textbf{readxml} command.
    
   If a second argument \emph{filename} is given after a single $>$, the
   MathML tree is not output on the standard output of \sollya but if in
   the file \emph{filename} that get newly created or overwritten. If a double
   $>$ $>$ is given, the output will be appended to the file \emph{filename}.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> printxml(x + 2 + exp(sin(x)));

<?xml version="1.0" encoding="UTF-8"?>
<!-- generated by sollya: http://sollya.org/ -->
<!-- syntax: printxml(...);   example: printxml(x^2-2*x+5); -->
<?xml-stylesheet type="text/xsl" href="http://sollya.org/mathmlc2p-web.xsl"?>
<?xml-stylesheet type="text/xsl" href="mathmlc2p-web.xsl"?>
<!-- This stylesheet allows direct web browsing of MathML-c XML files (http:// o
r file://) -->

<math xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<annotation-xml encoding="MathML-Content">
<lambda>
<bvar><ci> x </ci></bvar>
<apply>
<apply>
<plus/>
<apply>
<plus/>
<ci> x </ci>
<cn type="integer" base="10"> 2 </cn>
</apply>
<apply>
<exp/>
<apply>
<sin/>
<ci> x </ci>
</apply>
</apply>
</apply>
</apply>
</lambda>
</annotation-xml>
<annotation encoding="sollya/text">(x + 1b1) + exp(sin(x))</annotation>
</semantics>
</math>

\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> printxml(x + 2 + exp(sin(x))) > "foo.xml";
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 3: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> printxml(x + 2 + exp(sin(x))) >> "foo.xml";
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{readxml} (\ref{labreadxml}), \textbf{print} (\ref{labprint}), \textbf{write} (\ref{labwrite})
