cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

I'm using the Web Request action (NOT Call Web Service) to run a REST GetListsByTitle function. I get a lovely blob of XML fine, and I copy and paste a sample into a Query XML action to have the XPath builder help me traverse the tree. It generates an XPath, but my workflow still errors out because the xpath has an 'invalid token'. Here' what XPath looks like: /defaultNS:feed/defaultNS:entry[2]/defaultNS:content/defaultNS:mSmiley Tongueroperties/defaultNS:d:Title. Any suggestions?

Labels: (1)
0 Kudos
Reply
19 Replies
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

I'm trying to figure out why the entry has a [2] following it. Any ideas?

0 Kudos
Reply
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

You can try with the following XPath :

//*[local-name()='Title']

Maybe you can share the XML you get from the web request

0 Kudos
Reply
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

the [2] is maybe because of the second "entry" node whereas it should be [position() = 2]

0 Kudos
Reply
Not applicable

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

@Andrew

Caroline is correct: it's the second 'entry' node.

@Caroline

You seem to be quite the expert on parsing response XML. Where do you finding this specialized syntax? If you have a resource, I'd love to see it! For example, to pull the Nth element in a repeating section, this syntax works perfectly: /RepeaterData/Items/Item/ChildElement. Also, I actually used the XML response from the web service and pasted it into the Query XML action source field to have it help me generate the XPath syntax. Should I not use this tool, or is it only appropriate in certain situations? Anyways, here's the https response xml:

xml version="1.0" encoding="utf-8"?>

feed xml:base="https://bridge.ohsu.edu/health/dom/Nephrology/_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>aeefbee2-8ed8-470e-90c5-03fb5376ae58</id>

title />

updated>2015-12-18T16:42:21Z</updated>

entry m:etag="&quot;11&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(1)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(1)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">1</d:Id>

d:Title>OHSU Acute</d:Title>

d:ID m:type="Edm.Int32">1</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;10&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(2)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(2)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">2</d:Id>

d:Title>PNRS Clark County</d:Title>

d:ID m:type="Edm.Int32">2</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(3)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(3)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">3</d:Id>

d:Title>Beaverton Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">3</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(4)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(4)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">4</d:Id>

d:Title>Clackamas Kidney Center</d:Title>

d:ID m:type="Edm.Int32">4</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(5)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(5)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">5</d:Id>

d:Title>PNRS Ft. Vancouver</d:Title>

d:ID m:type="Edm.Int32">5</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(6)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(6)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">6</d:Id>

d:Title>Gateway Dialysis</d:Title>

d:ID m:type="Edm.Int32">6</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(8)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(8)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">8</d:Id>

d:Title>Hillsboro Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">8</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(9)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(9)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">9</d:Id>

d:Title>Hilltop Dialysis</d:Title>

d:ID m:type="Edm.Int32">9</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(10)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(10)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">10</d:Id>

d:Title>Hollywood Dialysis</d:Title>

d:ID m:type="Edm.Int32">10</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(11)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(11)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">11</d:Id>

d:Title>PNRS Home Dialysis</d:Title>

d:ID m:type="Edm.Int32">11</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(12)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(12)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">12</d:Id>

d:Title>Lake Road</d:Title>

d:ID m:type="Edm.Int32">12</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(13)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(13)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">13</d:Id>

d:Title>Maywood Park</d:Title>

d:ID m:type="Edm.Int32">13</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;5&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(14)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(14)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">14</d:Id>

d:Title>McMinnville Kidney Center</d:Title>

d:ID m:type="Edm.Int32">14</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(15)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(15)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">15</d:Id>

d:Title>Meridian Park</d:Title>

d:ID m:type="Edm.Int32">15</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(16)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(16)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">16</d:Id>

d:Title>Mt Hood Dialysis</d:Title>

d:ID m:type="Edm.Int32">16</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(17)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(17)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">17</d:Id>

d:Title>NE Portland</d:Title>

d:ID m:type="Edm.Int32">17</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(18)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(18)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">18</d:Id>

d:Title>PNRS Newberg Dialysis</d:Title>

d:ID m:type="Edm.Int32">18</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(19)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(19)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">19</d:Id>

d:Title>Noble Woods</d:Title>

d:ID m:type="Edm.Int32">19</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(20)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(20)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">20</d:Id>

d:Title>Oregon Kidney Center</d:Title>

d:ID m:type="Edm.Int32">20</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;5&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(21)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(21)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">21</d:Id>

d:Title>Portland Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">21</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(22)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(22)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">22</d:Id>

d:Title>PNRS Raines Dialysis</d:Title>

d:ID m:type="Edm.Int32">22</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(23)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(23)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">23</d:Id>

d:Title>Ray Yasui Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">23</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(24)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(24)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">24</d:Id>

d:Title>PNRS Rose Quarter Dialysis</d:Title>

d:ID m:type="Edm.Int32">24</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(25)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(25)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">25</d:Id>

d:Title>PNRS Salmon Creek Dialysis</d:Title>

d:ID m:type="Edm.Int32">25</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(26)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(26)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">26</d:Id>

d:Title>Scholls Ferry</d:Title>

d:ID m:type="Edm.Int32">26</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(27)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(27)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">27</d:Id>

d:Title>Sherwood Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">27</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;9&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(28)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(28)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">28</d:Id>

d:Title>PNRS St Helens Dialysis</d:Title>

d:ID m:type="Edm.Int32">28</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(30)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(30)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">30</d:Id>

d:Title>Tualatin Dialysis</d:Title>

d:ID m:type="Edm.Int32">30</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(31)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(31)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">31</d:Id>

d:Title>PNRS Twin Oaks</d:Title>

d:ID m:type="Edm.Int32">31</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(32)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(32)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">32</d:Id>

d:Title>Vancouver Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">32</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(33)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(33)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">33</d:Id>

d:Title>Walker Road</d:Title>

d:ID m:type="Edm.Int32">33</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;7&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(34)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(34)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">34</d:Id>

d:Title>West Linn Dialysis Center</d:Title>

d:ID m:type="Edm.Int32">34</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;8&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(35)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(35)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">35</d:Id>

d:Title>Willamette Valley</d:Title>

d:ID m:type="Edm.Int32">35</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;3&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(37)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(37)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">37</d:Id>

d:Title>Cornell Road</d:Title>

d:ID m:type="Edm.Int32">37</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;2&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(38)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(38)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">38</d:Id>

d:Title>MLK Dialysis</d:Title>

d:ID m:type="Edm.Int32">38</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;4&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(40)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(40)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">40</d:Id>

d:Title>Piedmont</d:Title>

d:ID m:type="Edm.Int32">40</d:ID>

mSmiley Tongueroperties>

content>

entry>

entry m:etag="&quot;6&quot;">

id>Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(41)</id>

category term="SP.Data.Dialysis_x0020_UnitsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

link rel="edit" href="Web/Lists(guid'513cc3b1-17cf-49be-8880-58e5fc705e79')/Items(41)" />

title />

updated>2015-12-18T16:42:21Z</updated>

author>

name />

author>

content type="application/xml">

mSmiley Tongueroperties>

d:Id m:type="Edm.Int32">41</d:Id>

d:Title>The Dalles</d:Title>

d:ID m:type="Edm.Int32">41</d:ID>

mSmiley Tongueroperties>

content>

entry>

feed>

0 Kudos
Reply
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

Oups, you're right, the following syntax works : /Item[2]/...

Actually I don't have a specific resource (other than Google )

 

The following XPath should do the trick :

/defaultNS:feed/defaultNS:entry[2]/defaultNS:content/*/*[local-name()='Title']

 

When I perform REST API web requests, the default Xpath provided sometimes does not work. It is because of the several namespaces. With the function local-name(), you get the node name without the namespace.

 

If you'd like to filter with the Id (to get the title from the item having Id = 2), you can use the following xpath (but filtering directly in the web request using "?$filter=Id eq 2" is more efficient) :

//*[local-name()='Id' and .='2']/../*[local-name()='Title']

 

Hope this helps

View solution in original post

Reply
Not applicable

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

Caroline,

Thanks, worked perfectly! I know that a $filter parameter is more efficient if I'm looking for a single item, but I'm not. Let me explain further. I have a repeating section that allows for multiple mileage entries, and I store the XML in a field rather than the Form Data hidden field (the Update XML and other actions are easier to use in a separate field). Each Repeater line has a lookup column for origin and a lookup column for destination, which only stores the lookup ID in the Repeater XML. On Create and On Field Change I loop through the repeating section and create an HTML table that I store in a Rich Text MLOT field so it can be seen in a list view. Essentially, I need to get the origin and destination name from the ID in each loop, which would be 2 Query List actions for every iteration. I figured stuffing the name and Id of all my possible units in an XML variable (via a web request at the beginning of the workflow) and pulling the title out for both origin and destination in a query xml action each iteration would be more efficient than using query list iteratively. Let me know if I'm wrong!

SR

0 Kudos
Reply
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

Spencer,

You're right, it's better to perform one web request at the beginning and then extract what we need in each iteration instead of performing a web request in each iteration.

So, the second XPath that I gave you is useful for this case, isn't it ?

Have a nice day

0 Kudos
Reply
Highlighted
jpmhuls
Nintex Newbie

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

Hi Caroline,

Your reply is very helpfull. The one data item I can't seem to extract is the list item ID. It's listed in the XML as both d:Id and d:ID (<d:Id m:type="Edm.Int32">10200</d:Id><d:ID m:type="Edm.Int32">10200</d:ID>). In a REST call returning both the ID and  document Name, I can extract the Name, but not the the ID (both Id and ID don't seem to work). Any idea what I'm missing here?

0 Kudos
Reply
Automation Master
Automation Master

Re: Parsing Web Request (NOT Call Web Service) Response XML

Jump to solution

Hi Jean-Pierre,

This XPath should work: //*[local-name()='Id']

If it doesn't work, can you share the XML from which you're trying to extract the ID ?

Reply