Project

Profile

Help

Extract Xpath from XdmAtomicValue

Added by meghana agrawal over 4 years ago

I want to extract xpath from XdmItem which is of subclass XdmAtomicValue. If XdmItem is of subclass XdmNode, then i am able to do so but when it is of subclass XdmAtomicValue, I am unable to extract the parent node and thus xpath as well. Can you please help me with the api/function which can help this case.


Replies (1)

RE: Extract Xpath from XdmAtomicValue - Added by Michael Kay over 4 years ago

An XdmAtomicValue is, for example, a number (23), a string ("Paris"), a boolean (true), or a date (1900-12-23). These values are not nodes, they are not part of a tree, and they do not have parents. Although an XPath expression (such as count(//*)) can return an XdmAtomicValue, the returned value contains no trace of how it was calculated or where it came from. So what you are trying to do is not possible.

    (1-1/1)

    Please register to reply