replace php-query with xpath