WiP: refactoring XPath conversion and moving it outside of the PHP serializer