{"action":"closed","issue":{"url":"https://api.github.com/repos/featurist/css-to-xpath/issues/2","labels_url":"https://api.github.com/repos/featurist/css-to-xpath/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/featurist/css-to-xpath/issues/2/comments","events_url":"https://api.github.com/repos/featurist/css-to-xpath/issues/2/events","html_url":"https://github.com/featurist/css-to-xpath/issues/2","id":107733869,"number":2,"title":"Return xpath-builder object","user":{"login":"Airborn22","id":3807921,"avatar_url":"https://avatars.githubusercontent.com/u/3807921?v=3","gravatar_id":"","url":"https://api.github.com/users/Airborn22","html_url":"https://github.com/Airborn22","followers_url":"https://api.github.com/users/Airborn22/followers","following_url":"https://api.github.com/users/Airborn22/following{/other_user}","gists_url":"https://api.github.com/users/Airborn22/gists{/gist_id}","starred_url":"https://api.github.com/users/Airborn22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Airborn22/subscriptions","organizations_url":"https://api.github.com/users/Airborn22/orgs","repos_url":"https://api.github.com/users/Airborn22/repos","events_url":"https://api.github.com/users/Airborn22/events{/privacy}","received_events_url":"https://api.github.com/users/Airborn22/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-22T15:04:28Z","updated_at":"2015-10-22T17:08:05Z","closed_at":"2015-10-22T17:08:05Z","body":"Hi @joshski,\r\n\r\nFirst of all I want to thank you for the great job, I really like your module :)\r\nThe only thing I miss is that currently I can't get the xpath-builer object when selecting an element. There are things which are not selectable with css, for example the content of a node. It would be great if you would return only `parse(selector)` on line 15 of `css_to_xpath.js` so you can continue to build your xpath object and then call `toXPath()` only when you need it. Something like this:\r\n```javascript\r\nvar cssToXPath = require('css-to-xpath');\r\nvar x = require('xpath-builder').dsl();\r\ncssToXPath('.modal-dialog .modal-title').where(x.text().equals('something')).toXPath()\r\n```\r\n\r\nI was thinking to make a pull request for that but I don't know if it would brake compatibility for others or if there is a nicer solution but if you say, I can do that :)\r\n\r\nIt would be also nice to be able get the reference of the xpath-builder module from your module so you don't have to load it while using css-to-xpath. The example above would be then something like\r\n```javascript\r\nvar cssToXPath = require('css-to-xpath');\r\ncssToXPath('.modal-dialog .modal-title').where(cssToXPath.x.text().equals('something')).toXPath()\r\n```\r\n\r\nThank you,\r\nAlex"}}