How can I make every attribute name in color X and every element name in color Y without adding keywords and stuff?
What I did so far:
\lstdefinelanguage{myXML}
{
morestring=[b]",
morecomment=[s]{<?}{?>},
morekeywords={
name,
type,
targetNamespace,
element,
xmlns,
xsd,
s0,
soap,
http
}
}
\lstdefinestyle{xmlStyle}{
language=myXML,
stringstyle=\color{mygreen},
identifierstyle=\color{blue},
keywordstyle=\color{mymauve},
}
What this results in:
As you can see, some of the element names (like xsd:something) are mauve instead of blue because they appear both as element and attribute name. Same with binding
and element
minted
an option for you?