1. A method for generating a type representation of an XMLType structure, comprising the steps of: generating, based on a source of XMLType data type information, an XMLType type tree of nodes representing the type structure of an XMLType instance; and wherein the step of generating an XMLType type tree of nodes includes: generating a leaf item node; and generating as a certain node, with one or more children nodes that include said leaf item node, either a: composite element item node that corresponds to an element node XMLType instance, composite document item node that corresponds to a document node XMLType instance, operator node that indicates how the one or more children nodes are grouped as a sequence, choice, or permutation, or aggregate node with an aggregate quantifier set to indicate a cardinality restriction on the one or more children nodes.