8270504: Better Xpath expression handling

Reviewed-by: andrew
Backport-of: b61a2ca626b1da5e555c50e548b643a2daa396c6
25 files changed