\startbuffer[test]
<text>
  <!-- with following semicolon: ampersand and semicolon are eaten -->
  <p>Me &amp; my friends; you &amp; your friends.</p>
  <!-- without following semicolon: everything ok -->
  <p>Me &amp; my friends. You &amp; your friends.</p>
  <!-- way around: place a comment after the ampersand -->
  <p>Me &amp;<!-- --> my friends; you &amp; your friends.</p>
</text>
\stopbuffer

\startxmlsetups xml:somesetups
  \xmlsetsetup{#1}{text}{xml:text}
  \xmlsetsetup{#1}{p}{xml:p}
\stopxmlsetups

\xmlregistersetup{xml:somesetups}

\startxmlsetups xml:text
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
  \xmlflush{#1}\par\blank[line]
\stopxmlsetups

\starttext
  \xmlprocessbuffer{main}{test}{}
\stoptext