AnsweredAssumed Answered

Why isn't the collection count zero when it appears it should be?

Question asked by maxmanzero on Jul 27, 2016
Latest reply on Jul 28, 2016 by emha

I have a custom activity that makes a webrequest out to a secure service to get back some XML.

 

A normal message back is formatted like this:

<UserRoles>

     <UserRole>

          <RoleName>PA</RoleName>

          <RoleDescription>Personnel Administrator</RoleDescription>

          <EDIPI>0000000000</EDIPI>

          <ContainerGuid>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</ContainerGuid>

          <RootContainerGuid>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX </RootContainerGuid>

     </UserRole>

     <UserRole>

          <RoleName>PA</RoleName>

          <RoleDescription>Personnel Administrator</RoleDescription>

          <EDIPI>0000000001</EDIPI>

          <ContainerGuid>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</ContainerGuid>

          <RootContainerGuid>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX </RootContainerGuid>

     </UserRole>

</UserRoles>

 

And when I run a Query XML block on this with an XPATH of /UserRoles I get a resulting collection with a count of 2.

However when I get this back:

<UserRoles />

 

And I run the same Query XML block with the same XPATH I get a resulting collection with a count of 1. When you execute the Query XML block

with the Run Now button and put in the xml and the XPath the result appears to be blank, but I get a collection count of 1.

 

Why is that? ><

Outcomes