I've been reading through the W3 spec for XPath 3.1, and it's way too long for most to read (they'll just quit). Is there an abbreviated specification anywhere?
Our audience is users of our system that need to write an XPath statement to pull back the data they need. They are not programmers, they are business users. And they want to find a solution to their specific need as quickly as possible when they get stuck.
Update: First off, I totally agree with @kjhughes comment below "intrinsic tension". And I think Michael brings up a good point that the quick guide should be the main use - remove the edge cases. And reduce notes to a minimum (again no edge cases), but yes to examples.
What we have used for years is this tutorial, it tends to have a good balance between simplicity and teach all the basics. And this one is not bad.
But neither discusses either XPath 3.1 or crafting XPath for a JSON file. Is there anything equivalent out there.
As an example, here's three basic items I'm still struggling with:
- What's the syntax for a basic query. Using Southwind.json is it "/Employees/Employee" to get a list of all the employee nodes (I can't successfully load a JSON file in my code yet so I can't test this)?
- Are maps ever returned from an XPath query/evaluate? From reading this it looks like you can create and use them, but you don't ever get them as a returned item for a query.
- Are arrays only returned on queries of JSON? From reading this, I think that is the case. And this just maps to a JSON array - correct?