{"action":"opened","issue":{"url":"https://api.github.com/repos/djcsdy/haxe-xpath/issues/28","repository_url":"https://api.github.com/repos/djcsdy/haxe-xpath","labels_url":"https://api.github.com/repos/djcsdy/haxe-xpath/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/djcsdy/haxe-xpath/issues/28/comments","events_url":"https://api.github.com/repos/djcsdy/haxe-xpath/issues/28/events","html_url":"https://github.com/djcsdy/haxe-xpath/issues/28","id":161640839,"number":28,"title":"null casting error","user":{"login":"r3d9u11","id":15020827,"avatar_url":"https://avatars.githubusercontent.com/u/15020827?v=3","gravatar_id":"","url":"https://api.github.com/users/r3d9u11","html_url":"https://github.com/r3d9u11","followers_url":"https://api.github.com/users/r3d9u11/followers","following_url":"https://api.github.com/users/r3d9u11/following{/other_user}","gists_url":"https://api.github.com/users/r3d9u11/gists{/gist_id}","starred_url":"https://api.github.com/users/r3d9u11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r3d9u11/subscriptions","organizations_url":"https://api.github.com/users/r3d9u11/orgs","repos_url":"https://api.github.com/users/r3d9u11/repos","events_url":"https://api.github.com/users/r3d9u11/events{/privacy}","received_events_url":"https://api.github.com/users/r3d9u11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-22T10:01:32Z","updated_at":"2016-06-22T10:01:32Z","closed_at":null,"body":"Hi. When I try to select single node by xpath (with function selectNode) that is not exists in xml I have next error:\r\n\r\n```\r\nXPathHx.hx:72: null\r\nCalled from ? line 1\r\nCalled from Main.hx line 9\r\nCalled from TypeExt.hx line 173\r\nCalled from xpath/XPathHx.hx line 73\r\nUncaught exception - Class cast error\r\n```\r\n---------------------------------------------------------------------------------\r\n**upd**\r\n\r\nto fix you I changed line 72 in XPathHxXml.hx from\r\n`return cast(result, XPathHxXml).getWrappedXml();`\r\nto\r\n`return result != null ? cast(result, XPathHxXml).getWrappedXml() : null;`\r\n"}}
{"actor":{"display_login":"r3d9u11"}}