Skip to Content
0
Jul 02, 2015 at 05:54 AM

XPATH in interface determination

16 Views

Hi All,

I m trying to determine the receiver based on the number of time the field is occurring in the payload.

Below is the example payload.

<TransportList>

<MessageHeader>

<RecipientList>

<InternalID schemeID="A">aMapping</InternalID>

</RecipientList>

<RecipientList>

<InternalID schemeID="B">bMapping</InternalID>

</RecipientList>

<MessageHeader>

<TransportList>

Below is the xpath condition I have used.

/p1:TransportationList/MessageHeader[count(RecipientList/InternalID[@schemeID ='A' ]]) = 0 EX ) -> Mapping1

/p1:TransportationList/MessageHeader[count(RecipientList/InternalID[@schemeID ='A' ]]) > 0 EX ) -> Mapping2

It seems that i'm doing it the wrong way, somewhere.

can you guys please guide me :|

regards,

Arun