From ConTeXt wiki

For the list of XML manuals, see XML manuals.

This page is about processing XML with ConTeXt MkIV. Its information comes from the [Dealing with XML in ConTeXt MkIV], but the presentation is different: this explanation takes the architecture as a starting point, rather than the commands.

The general architecture

The pivotal element of the MkIV XML architecture is the namespace, or id: node processing instructions are associated with XML input by linking both to the same ID.

Setups are processing instructions. When a setup is invoked, it gets passed a single argument: a pointer to a node in the XML tree. xml... commands inside the setup access the node's various contents —

they get past a single argument, a pointer to an node \xmlsetsetup{ID} links an XML node to a setup, and stores this association in the namespace ID.

Importing the XML