1. A system comprising: a memory; and a processor configured to: receive a document instance as an input; for each element in the document instance: parse the element from the document instance; and perform a first validation of each parsed element using a second schema parse tree, wherein the second schema parse tree is generated from at least one schema that describes a document structure, schema elements parsed from the at least one schema are validated using a first schema parse tree that is static, the second schema parse tree is assembled to include nodes for respective types of document elements expected to be encountered and that correspond to the schema elements parsed from the at least one schema and validated using the first schema parse tree that is static, and at least one of the nodes is configured to call at least one user defined validation rule, external to the second schema parse tree, which validates the element of the document instance corresponding to the node; perform a second validation of at least one parsed element using the at least one user defined validation rule external to the second schema parse tree called from the node to which the parsed element corresponds; add the validated document elements to a validation report; and output the validation report.