# LaTeX lstlisting XML formatting

To format XML code in LaTeX using lstlisting, you can use the following language definition (adapted from here)

```\lstdefinelanguage{XML} {
morestring=[b]",
morestring=[s]{>}{<},
morecomment=[s]{},
identifierstyle=\textbf,
showstringspaces=false
}
```