An architecture that leverages support for markup language operations,
e.g., extensible markup language (XML) queries, via a lightweight
application program interface (API). The API defines an object model that
can simplify construction of XML values in languages that do not natively
support XML. The novel aspects of the described innovation can enable
query languages to be factored into general operations (e.g., mapping,
filtering, sorting, and/or projection of functions) on collections on one
hand, and a set of domain specific operations (e.g., navigation,
construction and modification) on the elements of these collections on
another hand. The subject API can support creation of XML data that is
node centric (e.g., context-free). Accordingly, nodes do not have to be
constructed within the context of a document. Additionally, aspects can
enable expression-oriented interface mechanisms as opposed to the
imperative statement-oriented style interfaces used in connection with
traditional interface mechanisms (e.g., DOM).