Closed ebuster closed 7 years ago
Hello @ebuster. This would be a nice idea indeed to enable XPath like selection or else but I won't add it to the library's core. However, a distinct library to enhance a tree so it can use this kind of utility by adding, say, a selectXpath
or xpath
to the tree & cursors coule be a nice addition.
Instead of proposed selectors format with multiple arguments or array:
I would like to use string path selectors:
var thirdColorCursor = tree.select('/palette/colors/2);
Implementation promises to be a simple (I didn't read sources yet, sorry):
Additionally it could be allows to use relative selectors, from already taken cursor: