cancel
Showing results for 
Search instead for 
Did you mean: 

XPATH in interface determination

0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Arun,

Can you try this and let us know if you still having issues.

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

-->mapping1

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

--> Mapping2

Note: The right operand after EX operator should be blank

Regards

Vishnu

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Arun,

Can you try this:


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

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

Regards,

Mark