01-03-2012 08:22 AM - edited 03-14-2019 09:07 AM
Hello,
Can someone tell whats wrong with my XPath, because it always returns null. I have tried different variations and nothing. I'm using UCCX 7.0
XML
<?xml version="1.0" encoding="utf-8" ?>
<GetManagersResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.labdomain.com/">
<ClaimManagersList>
<X_CLAIM_MANAGER>
<ClaimManagerUserName>test</ClaimManagerUserName>
</X_CLAIM_MANAGER>
</ClaimManagersList>
</GetManagersResult>
XPATH
"/descendant::GetManagersResult/child::ClaimManagersList/child::X_CLAIM_MANAGER/child::ClaimManagerUserName"
During debug, this is the value of the xml document when it reaches the Get XML Document Data step:
TEXT[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<GetManagersResult xmlns=\"http://www.labdomain.com/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n <ClaimManagersList>\r\n <X_CLAIM_MANAGER>\r\n <ClaimManagerUserName>test</ClaimManagerUserName>\r\n </X_CLAIM_MANAGER>\r\n </ClaimManagersList>\r\n</GetManagersResult>]
Solved! Go to Solution.
01-03-2012 10:02 AM
It's your XML namespace in the root element.
First off, I have never seen the CRS Editor play nice when XML namespaces are involved.
Secondly, with your namespace in place, not even a generic xpath expression tester can find your data. See attachements.
I think that if you find a way to either: not send, or remove the namespace from your document, your xpath expression will work.
With Namespaces
Without Namespaces
01-03-2012 10:02 AM
It's your XML namespace in the root element.
First off, I have never seen the CRS Editor play nice when XML namespaces are involved.
Secondly, with your namespace in place, not even a generic xpath expression tester can find your data. See attachements.
I think that if you find a way to either: not send, or remove the namespace from your document, your xpath expression will work.
With Namespaces
Without Namespaces
01-04-2012 03:15 AM
Thanks Anthony.
The problem was the namespaces declarations.
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