This project is read-only.

Query XML Sharepoint List using XPath

May 31, 2010 at 2:55 PM
Edited Jun 2, 2010 at 1:28 AM

I used "Call a Web Service" to an external web service (not sharepoint) and now I want to use "Query XML" and use the variable from the Response and get some information.

I would like to get this line <IncidentNumber>199578</IncidentNumber>, but nothing I do works for XPath. The only thing that returns results is using /* .

Here is my response:

UP

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<wsa:RelatesTo>urn:uuid:51b89de1-02b0-4724-8bcc-21ca213e9b25</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security><wsu:Timestamp wsu:Id="Timestamp-9d64d456-ac91-4115-9161-fe7a20f56e68"><wsu:Created>2010-05-31T13:44:23Z</wsu:Created>
<wsu:Expires>2010-05-31T13:49:23Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</env:Header>
<soap:Body>
<StackTrace />
<IncidentList><Incident>
<ClientEmail>SMTP:{my.name@company.com}my.name@company.com</ClientEmail>
<FirstNameAssignedTo>Name</FirstNameAssignedTo>
<GroupName>Groupname</GroupName>
<IncidentNumber>199578</IncidentNumber>
<LastNameAssignedTo>Lastname</LastNameAssignedTo>
<OpenDateAndTime>2010-05-31T09:44:23</OpenDateAndTime>
</Incident>
</IncidentList>
</Results>
</InsertIncResponse>
</soap:Body></soap:Envelope> 
I am not a XPath expert. Any help would be appreciated. Reading up on this entry I assumed //IncidentNumber should work or /soap/incidentlist/incident/incidentnumber.
UPDATE: I found out how to do this. I have to use //*[local-name()='IncidentNumber']. That is to easy.
Jun 2, 2010 at 1:29 AM

UPDATE: I found out how to do this. I have to use //*[local-name()='IncidentNumber']. That is to easy.