MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //usr/share/texmf/tex/context/sample/demo-xml.tex
% 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
<title label="example">Just an Example</title>

<p>There are three items:</p>

<itemize packed="yes">
  <item>Number One</item>
  <item>Number Two</item>
  <item>Number Three</item>
</itemize>

<p>And tree more</p>

<itemize>
  <item>First Line</item>
  <item>Second Line</item>
  <item>Third Line</item>
</itemize>
\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