Improved error message in XmlPath and added explicit type in path