01-29-2019 01:46 AM - edited 03-14-2019 06:45 PM
Hi,
I trying to read a XML document.
I need the value onCaller_Mail where onCaller_Group=A and onCaller_DN=5002 (see xml sample at the bottem)
I tried:
response=get XML Document Data("//onCaller[(onCaller_DN='"5002"') && (onCaller_groep='"A"') ]/onCaller_Mail")
but I get an error:-(
when I try a single check is works fine.
response=get XML Document Data("//onCaller[onCaller_DN='"5002"') ]/onCaller_Mail")
Someone any idea?
Thanks in advance,
Wim
================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2019-01-18T17:41:34">
<onCaller>
<onCaller_ID>60</onCaller_ID>
<onCaller_groep>A</onCaller_groep>
<onCaller_groepDN>5000</onCaller_groepDN>
<onCaller_Mail>mail01</onCaller_Mail>
<onCaller_DN>5001</onCaller_DN>
</onCaller>
<onCaller>
<onCaller_ID>61</onCaller_ID>
<onCaller_groep>A</onCaller_groep>
<onCaller_groepDN>5000</onCaller_groepDN>
<onCaller_Mail>mail02</onCaller_Mail>
<onCaller_DN>5002</onCaller_DN>
</onCaller>
</dataroot>
01-29-2019 08:37 AM - edited 01-29-2019 08:44 AM
According to an online XPATH testing tool, this should work:
//*[onCaller_DN='5001' and onCaller_groep='A']/onCaller_Mail
And if you need to use this in your step with some variables, then it would look like this (assuming variable names here):
"//*[onCaller_DN='" + dn + "' and onCaller_groep='" + groep + "']/onCaller_Mail"
PS, I didn't know how to do this either, so I searched for xpath syntax, which brought me to this page, and then I searched for xpath predicate and operator, which brought me to this page. I have not tested this in UCCX, but it makes sense to me that it would work. Let me know if it works!
02-13-2019 06:14 AM
02-13-2019 08:10 AM
01-29-2019 08:39 AM - edited 01-29-2019 08:40 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide