Datapolis Process System
Parse Document Library XML File
This tutorial will show you how to get specific node value from file in Document Library.
In this tutorial it is assumed that reader knows how to create workflows and use activities and functions.
Please read Calling REST Services tutorial before this one.
Introduction
For get xml node value of file that was uploaded to Document Library you need to use two functions:
You need to use second function as a parameter value for first one.
Parsing XML File
Lets image you have XML File in document library that contains below XML:
<SomeRootNode><SomeOtherNode>SomeValue</SomeOtherNode></SomeRootNode>
and you would like to get SomeValue text. For achieving this you need to configure your Get node or attribute function as below:
Getting XML File Content
Where http://sp/web is address of web site where Document Library is located, DocumentLibrary is a name of Document Library and ItemId is ID of an item on this Document Library. E.g. http://sp/myweb/_api/web/lists/getbytitle('Documents')/items(2)/File/$value?binaryStringResponseBody=true
Result
As a result of using above functions you should get SomeValue text got from example xml. Of course you may use any other XML file and XPath query to get real data you need.