We present in this paper a system for rewriting user-specific XPath queries for higher sharing of common sub-expressions in a streaming environment. We rewrite these queries according to an extracted schema from a pre-processed stream and we apply the rewritten queries to a subsequent stream. We show that this rewriting yields a much higher throughput while keeping an error rate under control. Keywords XML, XQuery Processing, Precision, Throughput.