Patent Number: 6,763,499

Title: Methods and apparatus for parsing extensible markup language (XML) data streams

Abstract: Various features enable an XML data stream to be parsed without the need to build a hierarchical tree structure for the XML document. In the described embodiment, the concept of an element or namespace stack is utilized as a way of organizing parsing activities and maintaining a definable place within the structure of the XML document. Various structures work together with the element or namespace stack to facilitate piecewise parsing of the XML data stream. One structure is a namespace hierarchy that is a collection of namespace objects that each represent a namespace specification that is encountered in the XML data stream. Each object includes a namespace prefix and an associated namespace specification. This structure creates a hierarchical organization that is used for mapping a particular encountered namespace specification into a unique value that represents both the namespace specification and an element tag in which the namespace specification occurs. Another structure is a dictionary collection that contains one or more dictionaries. Each dictionary is specifically associated with a namespace specification that is encountered in the XML data stream. The dictionaries contain entries for one or more tag names and each name's associated unique token. The token is returned and placed on the element stack along with another special value that enables the proper state to be maintained during processing of the XML data stream. The stack also includes a text accumulation buffer that can hold any text that is contained within an element (between the element tags). When an XML element is encountered, the element stack is used to organize parsing activities as the parser makes its way through the XML data stream.

Inventors: Friedman; Greg S (Redmond, WA), Lovett; Christopher J (Woodinville, WA), Zeng; Nanshan (Redmond, WA)

Assignee: Microsoft Corporation

International Classification: G06F 17/27 (20060101); G06F 17/22 (20060101); G06F 017/22 ()

Expiration Date: 07/13/2021