Patent ID: 7500184

Claim:
A computer-implemented method of parsing a markup-language document, comprising: detecting, in a markup-language document, a start of a first data node of a first node type; identifying a first data definition associated with the first node type, wherein the first data definition specifies defined contents of the first node type including a minimum occurrence value associated with the first node type and a maximum occurrence value associated with the first node type; pushing a first entry associated with the first data node onto an end of a stack, wherein the first entry includes the minimum occurrence value and the maximum occurrence value; reading, from the markup-language document, contents of the first data node by at least: identifying a start of a second data node within the first data node, wherein the second data node is a child node of the first data node; incrementing an occurrence count associated with child nodes of the first data node; reading, from the markup-language document, contents of the second data node; determining an acceptance status of the first data node based on the first data definition and the occurrence count, wherein the acceptance status indicates whether one or more of the defined contents of the first data definition have been read from the first data node; identifying, in the markup-language document, an end of the first data node based on the acceptance status of the first data node; and popping the first entry from the end of the stack, in response to identifying the end of the first data node.