The simplest steps are:
- Put you XML text inside
pre
tag; - Replace angular brackets with
<
and >
; - Replace
&
with &
; - PROFIT!
The purpose of the steps show it to re-work XML in text showing XML in HTML, without tags. Some advanced step would be using syntax highlighting, pretty much as CodeProject does. For this purpose, add some text-inline tags (such as
span
, perhaps with the attribute
class
) and use CSS styles on the tags and classes.
—SA