Be aware xpath implementation in ExtendScript is all but exhaustive. Most of those axes won't work.
Due to the one-pass nature of this implementation, the following XPath expressions are specifically
No ancestor or preceding-sibling axes, including .., ancestor::, preceding-sibling::.
See xpath limitations in Adobe Scripting guide for more details.
Then how we can use xpath in indesign to find the xml node
Well, you can still use evaluateXPathExpression to retrieve xmlElements and once grabbed look for following/preceeding-siblings by using indeces or collection nextItem(), previousItem() special functions.
For parent, you can use…parent property of any xmlElement…
Could you possible to give some example and sample code for evaluateXPathExpression, collection.
Thanks in advance!!