Hi I use the following LaTeX to ouput xml format data, however, there is no space before each line.
\documentclass{minimal}
\usepackage{etex},
\begin{document}
\medskip
{\small\noindent
\fbox{\begin{minipage}{6cm}
<invoke operation="a3". . .>\\
\hspace{3mm}<Handler>\\
\ \ \ \ \ <operation="...." . . .>\\
\ \ <Handler>\\
</invoke>
\end{minipage}}
}
\medskip
\end{document}
The output is below:

However, I wish to output the format like this as there is some space align each line.

Can someone help me?


verbatimenvironment, or a package for more sophisticated code listings, such aslistingsorminted. Edit: see e.g. http://tex.stackexchange.com/questions/52780/how-to-escape-xml-code Spaces are preserved inverbatim,lstlistingsand the like. – Torbjørn T. Sep 30 '13 at 18:35