Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Created June 7, 2014 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/f848b62a81e249067f3b to your computer and use it in GitHub Desktop.
Save yorickpeterse/f848b62a81e249067f3b to your computer and use it in GitHub Desktop.
[yorickpeterse in oga]$ pry -r ./lib/oga
2.1.2p95 > Oga::XPath::Parser.new('/div[@class="container"]/div[@class="review"]').parse
=> (xpath
(path
(name nil "div")
(eq
(axis "attribute" "class")
(string "container")))
(path
(name nil "div")
(eq
(axis "attribute" "class")
(string "review"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment