I don't like this..
hard-wiring a specific xpath into a general call..

An alternative approach should be coded..
Perhaps passing a callback interface to fill results, where one impl. is your getAllQuerySetQueries and another is the previous incarnation (conn->getElements)