2 ms·
Coincidentally, this is exactly what XPath and XQuery do. E.g. text nodes don't have children nor attributes, yet it is perfectly legal to do text()/foo or text
by int_19h 3y ago
Coincidentally, this is exactly what XPath and XQuery do. E.g. text nodes don't have children nor attributes, yet it is perfectly legal to do text()/foo or text()/@foo - and the result is an empty sequence.
If you want this kind of semantics with JSON, take a look at https://www.jsoniq.org https://www.jsoniq.org