Using XPath in 2023

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • caniuse

    Raw browser/feature support data from caniuse.com

  • Might be interesting to see if JS libraries that do a lot of DOM manipulation could get some perf gains. Maybe they already utilize evaluate?

    [1] https://caniuse.com/?search=evaluate

  • dom

    DOM Standard

  • Domenic Denicola (the man who ruined promises) probably will as well.

    https://github.com/whatwg/dom/issues/67

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • constructor-spec

    Discussion and drafts of a possible spec for creating and resolving promises

  • That made me chuckle.

    For those not familiar with the promise design controversy:

    http://brianmckenna.org/blog/category_theory_promisesaplus

    https://github.com/promises-aplus/constructor-spec/issues/24

    https://github.com/promises-aplus/promises-spec/issues/94

  • promises-spec

    An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.

  • That made me chuckle.

    For those not familiar with the promise design controversy:

    http://brianmckenna.org/blog/category_theory_promisesaplus

    https://github.com/promises-aplus/constructor-spec/issues/24

    https://github.com/promises-aplus/promises-spec/issues/94

  • Playwright

    Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

  • I'm using Playwright [1] (dotnet version) to test my web app, and I mainly use XPath to identify elements on a page. I found it to be to the best choice in my use case, mainly because it is composable. I can define an XPAth to a table `tableXPath` and then reuse it to identify a cell in the table like eg $"""{tableXPath}//td[text()="my value"]""", and I can further reuse that to identify a sibling cell which might trigger an action.

    1: https://playwright.dev

  • camaro

    camaro is an utility to transform XML to JSON, using Node.js binding to native XML parser pugixml, one of the fastest XML parser around.

  • back in the day where every OTA (online travel agent) and airlines use XML for their API, we had to integrate them in an API gateway where to unify their API schema and workflow.

    we wrote a small package[1] (using pugixml) to transform XML to JSON using a custom Xpath template syntax. Make our job much easier.

    [1]: https://github.com/tuananh/camaro

  • fontoxpath

    A minimalistic XPath 3.1 implementation in pure JavaScript

  • Not XPath, but for folks interested in querying (rather than walking) syntax trees for arbitrary nodes, this is also a cool feature of tree-sitter[1]. It uses a scheme-like syntax, and it’s impressively efficient.

    And in terms of XPath, for folks using a JS stack, fontoxpath[2] supports a DOM facade adapter interface which allows for querying any arbitrary tree-like structure, so it could certainly handle the same use case.

    1: https://tree-sitter.github.io/tree-sitter/using-parsers#patt...

    2: https://github.com/FontoXML/fontoxpath

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • yq

    Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents (by kislyuk)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts