1. Apparatus for binding program code to portions of an XML-compliant document composed of a plurality of elements, each of which is identified by a tag, the elements being arranged in a nested relationship, the apparatus comprising: a data document including a plurality of element objects, each element object representing a part of the XML-compliant document, the plurality of element objects being arranged in a hierarchy representative of the nested relationship of the elements; a schema document referenced by the data document, the schema document containing a registry which maps a tag identifying one of the elements to a program ID code; and a mechanism that uses the program ID code to construct an object containing the program code.