Hi,
I've a Web Request which gets data from SharePoint using GET method and I've stored the XML response in a variable called "ResponseContent".
To Extract data, I've used Query XML action and passing XML source's content as {Variable:ResponseContent}
My XML looks like this:
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://mysite/sites/w/ProjRequest/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>f75e5831-abb3-44a7-aff8-8348d2fc33ab</id>
<title />
<updated>2017-09-05T14:09:33Z</updated>
<entry m:etag=""8"">
<id>Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(32)</id>
<category term="SP.Data.Project_x0020_Request_x0020_listItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(32)" />
<title />
<updated>2017-09-05T14:09:33Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Title>2016-06-10T14_27_36.xml</d:Title>
<d:Project_x0020_Name>ProjectName1</d:Project_x0020_Name>
<d:Department_x0020_01>Business Development</d:Department_x0020_01>
</m:properties>
</content>
</entry>
<entry m:etag=""8"">
<id>Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(34)</id>
<category term="SP.Data.Project_x0020_Request_x0020_listItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(34)" />
<title />
<updated>2017-09-05T14:09:33Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Title>2016-06-14T15_24_09.xml</d:Title>
<d:Project_x0020_Name>ProjectName2</d:Project_x0020_Name>
<d:Department_x0020_01>USA</d:Department_x0020_01>
</m:properties>
</content>
</entry>
<entry m:etag=""8"">
<id>Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(35)</id>
<category term="SP.Data.Project_x0020_Request_x0020_listItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="Web/Lists(guid'77e2432b-22e9-479d-885a-d7134f3034f9')/Items(35)" />
<title />
<updated>2017-09-05T14:09:33Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:Title>2016-06-14T15_25_38.xml</d:Title>
<d:Project_x0020_Name>ProjectName3</d:Project_x0020_Name>
<d:Department_x0020_01>Production Management</d:Department_x0020_01>
</m:properties>
</content>
</entry>
</feed>
My XPath query is /feed/entry/content/m:properties/d:Title
Return result as Text
Query result in VarCollection
To Count the collection, I've used "Count Items in Collection" Action
Target Collection as VarCollection
Total items as VarCount
I've published this workflow. When I ran this workflow, I'm getting VarCount as 0
My Intention is to get each m:properties stored in a collection and add it to current list as new list item. But I'm stuck on the above issue.
Could you please help me out here ?
Thanks,
Pandiarajan