dom/node: catch xpath exceptions