1. 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, by 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.