Patent ID: 7885965

Claim:
A method of operating a markup language parser to process markup language data and to provide processed data to an application, comprising: in a reader implemented by utilizing a processing unit to execute a first set of instructions stored in a machine-readable storage media, integrally including a reader buffer, tokenizing the markup language data and storing resulting tokens in the reader buffer, wherein the markup language parser includes at least the reader; in a scanner implemented by utilizing the processing unit to execute a second set of instructions stored in the machine-readable storage media, selectively creating string objects based on the tokens by accessing data directly from the reader buffer when the scanner determines a need by an application for the string objects, and providing the created string objects to the application, wherein the markup language parser includes at least the scanner; in the scanner, when the scanner receives a notification that tokens are to be overwritten in the reader buffer, determining whether a state of the scanner indicates that the tokens are unneeded; in the scanner, copying the tokens from the reader buffer to a scanner buffer, integrally included in the scanner, when the scanner receives the notification that the tokens are to be overwritten in the reader buffer unless the scanner determined that the state of the scanner indicates that the tokens are unneeded; and in the scanner, selectively creating at least one additional string object based on the tokens by accessing data from the scanner buffer when the scanner determines a need by the application for the at least one additional string object.