Skip to content

Instantly share code, notes, and snippets.

@fghber
Last active November 30, 2021 02:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fghber/123998fdcdf00cd30fd552dc3494c831 to your computer and use it in GitHub Desktop.
Save fghber/123998fdcdf00cd30fd552dc3494c831 to your computer and use it in GitHub Desktop.

XPath

https://blog.scrapinghub.com/2016/10/27/an-introduction-to-xpath-with-examples

XPath Online Checker (shareable)

  • videlibri: Template / XPath 3.0 / XQuery 3.0 / CSS 3 Selector / JSONiq Online Tester
  • XPath Evaluator: Online XPath tester that supports XPath 3.0 and XQuery 3.0 via Saxon-HE 9.7 and XPath 1.0 via .NET XPath engine (GitHub).
  • BeautifyConverter XPath Tester (requires free registration, sports many other useful online tools like minifiers, beautifiers, converters, validators, etc.)

non-shareable

https://stackoverflow.com/questions/688323/is-there-an-online-tester-for-xpath-selectors

CSS Selectors

XQuery

http://edutechwiki.unige.ch/en/XQuery_tutorial_-_basics
https://en.wikibooks.org/wiki/XQuery/Sequences
https://en.wikibooks.org/wiki/XQuery/FLWOR_Expression#Comparing_FLWOR_with_imperative_for_loops

XPath in VBA

$xmldata = @" x x "@ $doc = new-object -COM MSXML2.DOMDocument.6.0 $doc.setProperty("SelectionLanguage", "XPath") $doc.async = $FALSE $doc.loadXML($xmldata) $doc.selectNodes("osm/way[tag[@k='railway'][@v='station']] | osm/rel[tag[@k='railway'][@v='station']]")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment