We consider the XPath evaluation problem: Evaluate an XPath query Q on a streaming XML document D; i.e., determine the set Q (D) of document elements selected by Q . We mainly consider Conjunctive XPath queries that involve only the child and descendant axes. Previously known in-memory algorithms for this problem use O (|D|) space and O (|Q ||D|) time. Several previously known algorithms for the streaming version use Ω(d n ) space and Ω(d n |D|) time in the worst case; d denotes the depth of D, and n denotes the number of location steps in Q . Their exponential space requirement could well exceed the O (|D|)space used by the in-memory algorithms. We present an efficient algorithm that uses O (d|Q | + nc) space and O ((|Q | + dn)|D|) time in the worst case; c denotes the maximum number of elements of D that can be candidates for output, at any one instant. For some worst case Q and D, the memory space used by our algorithm matches our lower bound proved in a different paper; so, our algorithm uses optimal memory space in the worst case.