In the HTML file, I need to show some XML code. The problem is that I can’t use
<pre>..</pre>
to show ‘<‘ and ‘>’.
What would be the solution for this problem?
ADDED
From the answer, replacing ‘<‘ and ‘>’ to < and> can be a solution. I’m an Emacs user, are there Emacs tools/magic to do that automatically? I mean, I can use search and replace, but I expect Emacs can do it by ‘select region’ -> ‘M-x replace_xml’ or something.
You need to escape
<as<and&as&. Optionally, for consistency, you can escape>as>To do this automatically in Emacs, if you’re in HTML mode, you can select the code that you would like to escape, and run M-x sgml-quote.