I have a new lstenvironment defined like this:
\lstnewenvironment{xml}
{\lstset{language=xml, basicstyle=\ttfamily, frame=single, captionpos=b}}
{}
Then I want to apply it in my code:
\begin{xml}[label=base,caption=A configuration XML file.]
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<connecting>
<url>something</url>
<user>username</user>
<password>password</password>
</connecting>
</config>
\end{xml}
In the output, I would expect caption printed at the bottom of the listing, however, it is not. Some suggestions? Do I need to include something more within \lstset?