cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1942
Views
5
Helpful
2
Replies

UCCX XPath on Get XML Document Data Step always returns null

filipe.paredes
Level 1
Level 1

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>]

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

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


View solution in original post

2 Replies 2

Anthony Holloway
Cisco Employee
Cisco Employee

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


Thanks Anthony.

The problem was the namespaces declarations.