Patent ID: 7007230

Claim:
A computer system for parsing an XML data stream comprising: means for receiving an XML data stream containing a namespace prefix and an associated element tag name, the element tag name being associated with an element tag; means for converting the namespace prefix and the element tag name into a token that uniquely represents a namespace specification that is associated with the namespace prefix and the element tag; means for defining a stack that is configured to receive a plurality of frames, individual ones of which represent individual tokens, during parsing of the XML data stream; and means for placing a token on the stack, wherein the stack comprises a plurality of frames each of which includes a token field for holding a token value, a namespace field for holding a namespace value, and a text field for holding any text that is associated with a particular element tag, and further comprising: for each element tag that is encountered in the XML data stream: means for storing a value for a current top namespace, if any, in a defined variable; and means for determining whether the element tag contains any namespace declarations and, if so, means for building a namespace hierarchy comprising namespace objects for each declared namespace, the most recently created namespace object defining the current top namespace; means for determining whether a next element tag is a close element tag and if so: means for processing any text that is contained in the text field of the top stack frame; means for determining whether the value that was stored in the defined variable for the current top namespace matches the namespace value that is held in the namespace field for the stack frame and if there is match, means for removing the top stack frame from the stack; and if there is not a match, means for defining a new value for the defined variable and means for determining whether the new value matches the namespace value that is held in the namespace field for the stack frame.