1. A computer-implemented method comprising the steps of: (1) during evaluation of at least a first XPath expression comprising a plurality of steps, an XPath evaluation component identifying a next unmatched step in the plurality of steps; (2) the XPath evaluation component sending an event request to an XML event-streaming component; wherein the event request includes one or more criteria that specify a characteristic of at least a first XML event that will satisfy the next unmatched step; wherein the XML event-streaming component is separate from the XPath evaluation component; (3) in response to the event request, the XML event-streaming component streaming an XML event to the XPath evaluation component; wherein the XML event-streaming component determines the XML event to stream to the XPath evaluation component based on the specified characteristic of at least the first XML event that will satisfy the next unmatched step; (4) the XPath evaluation component matching the XML event to said next unmatched step; (5) repeating steps 1-4 with respect to at least a new next unmatched step in the first XPath expression, until the XPath evaluation component determines that there are no remaining unmatched steps in the first XPath expression; and (6) outputting an XPath result based at least upon the XML event streamed in the last iteration of step 3; wherein the method is performed by one or more computing devices.