XPATHSNIPPET Unusual Behaviour

Hi,

I am seeing a very unusual behaviour with xpathsnippet function.

Example - I have 2 different branches within my XML:

1. <ParentNode>

      <Child Node>

           <LatestValue>

                   <Attributes>

                   <XYZ>1.0<XYZ>.......and so on

           <HistoricalValue>

                   <Attributes>

                   <XYZ>8.70<XYZ>.......and so on

Now I am trying to access the LatestValue using xpathsnippet function and sometimes there is a case when we don't have LatestValue node itself so only Historical Value is present in that scenario ideally it should return NULL but it is fetching HistoricalValue and returning 8.70 which is a wrong value.

Is this the expected behaviour of this function OR I am missing something?

  Discussion posts and replies are publicly visible