facebook/hiphop-php — pull request #986 by danslo (2013-08-24 19:19:31+00:00)
Title: make simplexml xpath return original objects

Currently, xpath just creates new elements. This means that any
modification done to the return object will not change its original
parent.

xpath can also traverse -up- the hierarchical node tree, so we cannot
just recursively go through children to find a matching node. this is
why an additional m_root was introduced, to keep track of the root node
of the current tree.