{"action":"opened","issue":{"url":"https://api.github.com/repos/awetzel/sweet_xml/issues/28","repository_url":"https://api.github.com/repos/awetzel/sweet_xml","labels_url":"https://api.github.com/repos/awetzel/sweet_xml/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/awetzel/sweet_xml/issues/28/comments","events_url":"https://api.github.com/repos/awetzel/sweet_xml/issues/28/events","html_url":"https://github.com/awetzel/sweet_xml/issues/28","id":140556967,"number":28,"title":"HTML entities in element content confuses xpath","user":{"login":"hewsut","id":2006764,"avatar_url":"https://avatars.githubusercontent.com/u/2006764?v=3","gravatar_id":"","url":"https://api.github.com/users/hewsut","html_url":"https://github.com/hewsut","followers_url":"https://api.github.com/users/hewsut/followers","following_url":"https://api.github.com/users/hewsut/following{/other_user}","gists_url":"https://api.github.com/users/hewsut/gists{/gist_id}","starred_url":"https://api.github.com/users/hewsut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hewsut/subscriptions","organizations_url":"https://api.github.com/users/hewsut/orgs","repos_url":"https://api.github.com/users/hewsut/repos","events_url":"https://api.github.com/users/hewsut/events{/privacy}","received_events_url":"https://api.github.com/users/hewsut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-14T02:11:41Z","updated_at":"2016-03-14T02:11:41Z","closed_at":null,"body":"HTML entities in the element content appear to confuse xpath. It either seems to truncate the string on certain valid entities (eg, `&lt;`) or blows up entirely.\r\n\r\nExample failures:\r\n_the_following_data_ |> SweetXml.xpath( ~x\"//soapenv:Body/*[1]/*\", message: ~x\"name(.)\", part: ~x\"./text()\") \r\n\r\n```\r\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"><soapenv:Body><ns1:loginResponse soapenv:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" xmlns:ns1=\\\"http://www.someplace.com/webservices/\\\"><loginReturn xsi:type=\\\"soapenc:string\\\" xmlns:soapenc=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">vSFFDDDzA34/SNu384NhbT93cGEEE+msH4hk&lt;separator&gt;LfhRIM7U9B0=+_+Blahblah</loginReturn></ns1:loginResponse></soapenv:Body></soapenv:Envelope>\r\n```\r\n\r\n```\r\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"><soapenv:Body><ns1:loginResponse soapenv:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" xmlns:ns1=\\\"http://www.someplace.com/webservices/\\\"><loginReturn xsi:type=\\\"soapenc:string\\\" xmlns:soapenc=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">vSFFDDDzA34/SNu384NhbT93cGEEE+msH4hk&dlt;separator&xgt;LfhRIM7U9B0=+_+Blahblah</loginReturn></ns1:loginResponse></soapenv:Body></soapenv:Envelope>\r\n```\r\n\r\nRemove the ampersands in the `loginReturn` bodies and the query works."}}