Hans, I have the following sample: \startbuffer[demo] <doc> <div> <source>\command[option=value]{text "<&>"}</source> </div> <div class="sourceCode"> <pre class="sourceCode tex"> <code class="sourceCode latex"> <span class="fu">\command</span>[option=value]{text "<&>"} </code> </pre> </div> </doc> \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|source|div|span}{xml:*} \xmlsetsetup{\xmldocument} {pre[contains(@class,'sourceCode')]/ code[contains(@class,'sourceCode')]} {xml:pre:code} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:div \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:source \xmlprettyprint{#1}{tex} \stopxmlsetups \startxmlsetups xml:pre:code \xmlflushspacewise{#1} \stopxmlsetups \startxmlsetups xml:span \bgroup\xmlflush{#1}\egroup \stopxmlsetups The .sourceCode elements are the standard way in which pandoc serves colored code. I have to deal with them. In the sample above, for xml:pre:code, I would need and expanded \xmlprettyprint that also ignores tags inside (anything between < and >, but not the entities). Which is the way to get this expanded \xmlprettyprint? Many thanks for your help, Pablo -- http://www.ousia.tk