Contrary to problem of XPath query processing with a predicate in XML data stream and query optimization, this paper presents the solution of first completing Xpath query structure wizard, and then completing the predicate matching. In order to improve query processing efficiency, this paper proposes with XML document structure information to establish the structure index, with the structure index to pretreat structure wizard part of Xpath query, obtain the structure index of the path matching, then using the structure index of the path matching to process XML data stream, complete matching of XPath query predicate. It has been solved that large XML structure index, Xpath query with the predicate low efficiency, experimental results show that the algorithm can effectively speed up the search and reduce memory consumption.