Skip to end of metadata
Go to start of metadata
This page is work-in-progress. Until finalization, normative language in this page should be considered a proposal.

Runtime data structures

xml elements

Elements are represented as maps with keys #{:tag :attrs :content}. There is a defrecord for tags in data.xml, exposed through the constructors element and element*.

xml names

In the general case, xml names are represented as QNames or, if they have no namespace uri, as keyword.

data.xml has a facility to associate clojure namespaces with xml namespace uris. Which allows clojure's shorthand-syntax for namespaced keywords to be used:

xml attributes

Are stored in hash-maps. The parser removes xmlns attributes from the attr hash and stores them in metadata (accessible via

The namespace environment can be augmented by associating :xmlns and :xmlns/<prefix> attributes.