Patent ID: 8522136

Claim:
A method for validating an XML document, the method comprising: storing, by a computer, structure information of an XML schema in an XML schema node array for structure validation of the XML document, wherein the XML schema node array is a one-dimensional array of parent and child nodes arranged in a contiguous manner, wherein storing the structure information in the XML schema node array comprises: capturing parent child relationships of XML nodes in the XML document; arranging children of a parent node of the XML document contiguously; arranging attributes of an element node of the XML document contiguously; saving index of a first child node of the parent node and count of children of the parent node; and saving index of a first attribute of an element node and count of attributes of the element node; storing datatype and value range information of the XML schema and a derivation hierarchy in an XML schema type node array for datatype validation of the XML document, wherein the XML schema type node array is a one-dimensional array, and wherein an index of a parent node stored for each child node in the XML schema type node array provides the derivation hierarchy, the parent node providing additional information for datatype validation of each child node, and wherein information is stored concerning derivation by extension that adds data values to an original datatype and derivation by restriction that adds constraints while maintaining a semantic and meaning of the original datatype; and validating the XML document using information stored in the XML schema node array and in the XML schema type node array.