<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% interface=en

\defineXMLargument
  [title] [label=]
  {\title[\XMLop{label}]}

\defineXMLenvironment
  [itemize] [packed=]
  {\doifelseXMLop{packed}{yes}
     {\startitemize[packed]}
     {\startitemize}}
  {\stopitemize}

\defineXMLenvironment
  [item]
  {\item}
  {\par}

\defineXMLenvironment
  [p]
  {\ignorespaces}
  {\par}

\starttext

\startXMLdata
&lt;title label="example"&gt;Just an Example&lt;/title&gt;

&lt;p&gt;There are three items:&lt;/p&gt;

&lt;itemize packed="yes"&gt;
  &lt;item&gt;Number One&lt;/item&gt;
  &lt;item&gt;Number Two&lt;/item&gt;
  &lt;item&gt;Number Three&lt;/item&gt;
&lt;/itemize&gt;

&lt;p&gt;And tree more&lt;/p&gt;

&lt;itemize&gt;
  &lt;item&gt;First Line&lt;/item&gt;
  &lt;item&gt;Second Line&lt;/item&gt;
  &lt;item&gt;Third Line&lt;/item&gt;
&lt;/itemize&gt;
\stopXMLdata

Instead of putting the data in here you can put it in a file, say
\type {sample.xml} and load that file using:

\starttyping
\processXMLfilegrouped{sample.xml}
\stoptyping

\stoptext</pre></body></html>