Hello all,
I am struggling with the XPATH for finding a tspAccount using participantAccessCode as the search parameter. I am not good with XML and the addition of namespaces etc confuses me even more. I have been trying the below in PowerShell -
[System.Xml.XmlNamespaceManager] $nsm = new-object System.Xml.XmlNamespaceManager($ResultXML.NameTable)
nsm.AddNamespace("serv","http://www.webex.com/schemas/2002/06/service")
nsm.AddNamespace("com","http://www.webex.com/schemas/2002/06/common")
nsm.AddNamespace("use","http://www.webex.com/schemas/2002/06/service/user")
$tspAccount = $ResultXML.SelectSingleNode("//use:tspAccount[use:participantAccessCode='" + "99999999" + "']", $nsm)
but I am not successful in returning the node that has the 99999999 participant access code. Can someone tell me what is the correct XPATH to use?
$ResultXML is an object that has the resultant xml from a get user call. The XML looks like this -
.
.
.
<use:locale>U.S.</use:locale>
<use:active>ACTIVATED</use:active>
<use:tspAccount>
<use:tspAccount>
<use:tollFreeCallInNumber>,877,3046259</use:tollFreeCallInNumber>
<use:accountIndex>1</use:accountIndex>
<use:tollCallInNumber>1,210,6069525</use:tollCallInNumber>
<use:subscriberAccessCode>1234</use:subscriberAccessCode>
<use:participantAccessCode>99999999</use:participantAccessCode>
<use:defaultFlag>true</use:defaultFlag>
<use:custom1>
</use:custom1>
<use:custom2>
</use:custom2>
<use:custom3>
</use:custom3>
<use:tollFreeCallInData>1,</use:tollFreeCallInData>
<use:tollCallInData>0,1</use:tollCallInData>
<use:nbrDialOut>TOLL_FREE</use:nbrDialOut>
</use:tspAccount>
<use:tspAccount>
<use:tollFreeCallInNumber>1,,8773046259</use:tollFreeCallInNumber>
<use:accountIndex>2</use:accountIndex>
<use:tollCallInNumber>1,,2106069525</use:tollCallInNumber>
<use:subscriberAccessCode>4567</use:subscriberAccessCode>
<use:participantAccessCode>98989898989</use:participantAccessCode>
<use:defaultFlag>false</use:defaultFlag>
<use:custom1>
</use:custom1>
<use:custom2>
</use:custom2>
<use:custom3>
</use:custom3>
<use:tollFreeCallInData>1,1</use:tollFreeCallInData>
<use:tollCallInData>0,1</use:tollCallInData>
<use:nbrDialOut>TOLL_FREE</use:nbrDialOut>
</use:tspAccount>
</use:tspAccount>
<use:supportedServices>
<use:meetingCenter>true</use:meetingCenter>
.
.
.
thanks and regards,
-Ravi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Greetings! Unfortunately, it is not possible to search via participantAccessCode nor tspAccount. As you've noted in your original text, GetUser will show what the tspAccount configured for a user in its response, but there is no way to have GetUser search by this.
You can find more information on Getuser at:
Cisco DevNet: WebEx Conferencing - XML API - XML API Reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.