cancel
Showing results for 
Search instead for 
Did you mean: 

xpath condition

Former Member
0 Kudos

Hi,

I need an xpath to convert to uppercase for

<Empid>

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name>

<Empid>

Need to check the element FirstName contains Demo ( by converting it to uppercase)

I used various type like these:

/Empid/upper-case(FirstName) = 'DEMO'

/Empid[upper-case(FirstName) = 'DEMO'] ex

but when did test configuration ID got error in receiver determination, somebody please suggest a suitable path...to test this condition.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

RKothari
Contributor
0 Kudos

Hello,

Try using the below condition:

/Empid/Name[upper-case(FirstName) = 'DEMO']

OR

/EMPID/Name[translate(FirstName,'demo','DEMO')='DEMO']

-Rahul

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I agree the below logic should work

/Empid/Name[upper-case(FirstName) = 'DEMO']

Edited by: Baskar Gopal on Apr 11, 2011 9:53 AM

Former Member
0 Kudos

Hi ,

I tried the xpath as mentioned by you but got error in Test configuration...

extracting (old) for extractor ..

invalid reciever...

Ssomebody please help me with this

Thanks

Archanaa

Former Member
0 Kudos

HI Archanaa

as you mentioned you just need to check the value is "DEMO".. but you men to say it might come as "demo"

then why donu2019t you use following simple logic..

put two different condition in xpath with OR..

check if fieldvalue= "DEMO" OR if fieldvalue = "demo"

keep it simple..

Thanks,

Bhupesh

Former Member
0 Kudos

hi,

In my actual case i might get a string which starts with the word Demo so to be specific im converting it to upper case so the condition handle even if i get in caps... and i have changed my mapping in IR also accordingly for upper case so thats the reason i want to do it condition editor also..

Thanks

Former Member
0 Kudos

Hi,

You can use the value as 'DEMO' or 'demo' and don't use '=' operator, instead use '~' (tiled) operator.

-Supriya.

Answers (1)

Answers (1)

Former Member
0 Kudos

I dont think you can use an XSL function to convert the data eleement in payload using XPATH expression in RECV DET. This is only to traverse to a particular node in the source XML document, further processing might not be possible. If your recv det condition checking needs some programming/calculations, you have to opt for an extended recv determination and do the condition checking in the recv det mapping.

Regards,

Suddhasatta