Added some util methods for using XPath.

Signed-off-by: gitta-mannen <mail@janpettersson.com>