11. A program storage device readable by computer comprising a program of instructions executable by said computer to perform a method for query processing by using a streaming application programming interface (API) for a mark-up language data stream of a textual document, said method comprising: producing, in said streaming API for a mark-up language data stream, an ordered index of all textual elements corresponding to their order in said mark-up language data stream, said ordered index comprising tag identifiers and end positions corresponding to each of said all textual elements; scanning, by a processor, all tag identifiers of said ordered index to determine if there exists a match between a query and any of said tag identifiers; parsing a matched textual element, if a tag identifier, corresponding to said matched textual element, matches said query; and skipping an unmatched textual element for parsing, if a tag identifier, corresponding to said unmatched textual element, does not match said query.
11. A program storage device readable by computer comprising a program of instructions executable by said computer to perform a method for query processing by using a streaming application programming interface (API) for a mark-up language data stream of a textual document, said method comprising: producing, in said streaming API for a mark-up language data stream, an ordered index of all textual elements corresponding to their order in said mark-up language data stream, said ordered index comprising tag identifiers and end positions corresponding to each of said all textual elements; scanning, by a processor, all tag identifiers of said ordered index to determine if there exists a match between a query and any of said tag identifiers; parsing a matched textual element, if a tag identifier, corresponding to said matched textual element, matches said query; and skipping an unmatched textual element for parsing, if a tag identifier, corresponding to said unmatched textual element, does not match said query. 15. The program storage device of claim 11 , all the limitations of which are incorporated herein by reference, wherein said mark-up language data stream comprises HyperText Markup Language (HTML) or Extensible Markup Language (XML).