How do I escape ampersands in XML so they are rendered as entities in HTML?

When your XML contains &, this will result in the text &.

When you use that in HTML, that will be rendered as &.