{"action":"created","issue":{"url":"https://api.github.com/repos/getinsomnia/insomnia/issues/974","repository_url":"https://api.github.com/repos/getinsomnia/insomnia","labels_url":"https://api.github.com/repos/getinsomnia/insomnia/issues/974/labels{/name}","comments_url":"https://api.github.com/repos/getinsomnia/insomnia/issues/974/comments","events_url":"https://api.github.com/repos/getinsomnia/insomnia/issues/974/events","html_url":"https://github.com/getinsomnia/insomnia/issues/974","id":330421701,"node_id":"MDU6SXNzdWUzMzA0MjE3MDE=","number":974,"title":"[Question] how to use xpath on response body","user":{"login":"carmineesposito73","id":38761873,"node_id":"MDQ6VXNlcjM4NzYxODcz","avatar_url":"https://avatars3.githubusercontent.com/u/38761873?v=4","gravatar_id":"","url":"https://api.github.com/users/carmineesposito73","html_url":"https://github.com/carmineesposito73","followers_url":"https://api.github.com/users/carmineesposito73/followers","following_url":"https://api.github.com/users/carmineesposito73/following{/other_user}","gists_url":"https://api.github.com/users/carmineesposito73/gists{/gist_id}","starred_url":"https://api.github.com/users/carmineesposito73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmineesposito73/subscriptions","organizations_url":"https://api.github.com/users/carmineesposito73/orgs","repos_url":"https://api.github.com/users/carmineesposito73/repos","events_url":"https://api.github.com/users/carmineesposito73/events{/privacy}","received_events_url":"https://api.github.com/users/carmineesposito73/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-07T20:21:08Z","updated_at":"2018-07-30T01:17:15Z","closed_at":null,"author_association":"NONE","body":"- Insomnia Version: 5.16.6\r\n- Operating System: Ubuntu 18.04 LTS\r\n\r\n## Details\r\n\r\nI have a body response xml but I'm not able to filter using xpath, even using the line under the response (botton-right corner of insomnia windows) I got <result></result>.\r\n\r\nI checked the syntax of xpath with notepad++ and also with xpath command (on body saved by insomnia)\r\n\r\nthis is the line I want to get\r\n$ cat get-admin-1528367171121.xml | grep Org | grep Pilota\r\n        <OrganizationReference href=\"https://host.mydomain/api/admin/org/486e3ea9-8633-4939-95fa-ca953225f9b7\" name=\"Pilota\" type=\"application/vnd.vmware.admin.organization+xml\"/>\r\n\r\nI want to match the attibute 'name' and get the attribute 'href'\r\nxpath: //OrganizationReference[@name=\"Pilota\"]/@href\r\n\r\n$ xpath -e '//OrganizationReference[@name=\"Pilota\"]/@href' get-admin-1528367171121.xml\r\nFound 1 nodes in get-admin-1528367171121.xml:\r\n-- NODE --\r\n href=\"https://host.mydomain/api/admin/org/486e3ea9-8633-4939-95fa-ca953225f9b7\"\r\n\r\nbut even simpler filter do not work on insomnia, for example\r\nxpath: //OrganizationReference\r\n\r\nthe body I'm working on is quite big\r\nls -l get-admin-1528367171121.xml \r\n-rw-rw-r-- 1 carmine carmine 125070 giu  7 12:26 get-admin-1528367171121.xml\r\n\r\nbut even on small body I cannot filter based on xpath.\r\n\r\nI was able to filter using the JSONpath (of course on json on response body)\r\n\r\nthanks\r\ncarmine\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/getinsomnia/insomnia/issues/comments/408720984","html_url":"https://github.com/getinsomnia/insomnia/issues/974#issuecomment-408720984","issue_url":"https://api.github.com/repos/getinsomnia/insomnia/issues/974","id":408720984,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODcyMDk4NA==","user":{"login":"Kantankerus","id":7518746,"node_id":"MDQ6VXNlcjc1MTg3NDY=","avatar_url":"https://avatars2.githubusercontent.com/u/7518746?v=4","gravatar_id":"","url":"https://api.github.com/users/Kantankerus","html_url":"https://github.com/Kantankerus","followers_url":"https://api.github.com/users/Kantankerus/followers","following_url":"https://api.github.com/users/Kantankerus/following{/other_user}","gists_url":"https://api.github.com/users/Kantankerus/gists{/gist_id}","starred_url":"https://api.github.com/users/Kantankerus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kantankerus/subscriptions","organizations_url":"https://api.github.com/users/Kantankerus/orgs","repos_url":"https://api.github.com/users/Kantankerus/repos","events_url":"https://api.github.com/users/Kantankerus/events{/privacy}","received_events_url":"https://api.github.com/users/Kantankerus/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T01:17:15Z","updated_at":"2018-07-30T01:17:15Z","author_association":"NONE","body":"Lol, well at least I know why this exact use case isn't working for me either.\r\n[xml.txt](https://github.com/getinsomnia/insomnia/files/2239395/xml.txt)\r\n\r\n/OrgList/Org/@href should give me what I'm looking for but I'm getting empty results.  Improper XML from VMware or is this a bug in the XML interpreter in Insomnia?\r\n"}}
{"actor":{"display_login":"Kantankerus"}}