{"id":915,"date":"2015-11-28T19:13:04","date_gmt":"2015-11-28T19:13:04","guid":{"rendered":"https:\/\/regroove.ca\/stellark\/?p=915"},"modified":"2023-02-24T18:54:52","modified_gmt":"2023-02-24T18:54:52","slug":"targeting-xml-values-with-xpath","status":"publish","type":"post","link":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/","title":{"rendered":"Targeting XML Values with XPath"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Using Nintex Workflow to filter XML Web Request<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The Goal<\/h3>\n\n\n\n<p>When using a &#8220;get&#8221; web request to retrieve information from a server, we wanted to use a Nintex Workflow (in SharePoint 2013) filter each item and store the information in a list. Essentially, do as follows:<\/p>\n\n\n\n<ul>\n<li>Clear SharePoint list<\/li>\n\n\n\n<li>Check server monitor list<\/li>\n\n\n\n<li>Store each server ID<\/li>\n\n\n\n<li>Query each server, storing server name<\/li>\n\n\n\n<li>If status does not equal:\n<ul>\n<li>OK<\/li>\n\n\n\n<li>Disabled<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Store the status and corresponding error message<\/li>\n\n\n\n<li>Log the errored servers in SharePoint list<\/li>\n<\/ul>\n\n\n\n<p>This runs every 5 minutes, allowing us to trigger alerts whenever the list has an item in it and check out the issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Problem<\/h3>\n\n\n\n<p>The workflow is quite simple, but we noticed it wasn&#8217;t too easy to find information about how to manipulate the XML data. This is to say, given the screenshot in Figure 1 of the server list below, how do we collect the ID of each server so I can query it to check all monitoring statuses individually?<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><em>Figure 1 &#8211; Server Monitor List<br><\/em><\/p>\n\n\n\n<p>Note: the status column displayed in Figure 1 will display <strong>status=&#8221;ok&#8221;<\/strong> regardless of the actual monitoring statuses of each server. As such, we can not filter on that status and do need to log each server ID to check the internal monitors of each one.<\/p>\n\n\n\n<p>Shown below in Figure 2, we take a look at the first server (id=&#8221;43&#8243;). The next step is to scan each of the &lt;monitor&gt; elements, and if <strong>status<\/strong> were to be anything other than <strong>OK<\/strong> or <strong>Server Disabled<\/strong>, we would need to collect the <strong>status<\/strong> and <strong>errText<\/strong> elements.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><em>Figure 2 &#8211; Monitor Info for One Server<br><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Solution<\/h3>\n\n\n\n<p>Using the Nintex Workflow <strong>Query XML<\/strong> action, we get the server list, and store each ID in a collection. No issues here, as the XML values required no filtering.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Nintex Workflow to filter XML Web Request The Goal When using a &#8220;get&#8221; web request to retrieve information from a server, we wanted to use a Nintex Workflow (in SharePoint 2013) filter each item and store the information in a list. Essentially, do as follows: This runs every 5 minutes, allowing us to trigger &hellip; <a href=\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\"><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[80],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Targeting XML Values with XPath - Stephanie Kahlam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Targeting XML Values with XPath - Stephanie Kahlam\" \/>\n<meta property=\"og:description\" content=\"Using Nintex Workflow to filter XML Web Request The Goal When using a &#8220;get&#8221; web request to retrieve information from a server, we wanted to use a Nintex Workflow (in SharePoint 2013) filter each item and store the information in a list. Essentially, do as follows: This runs every 5 minutes, allowing us to trigger &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\" \/>\n<meta property=\"og:site_name\" content=\"Stephanie Kahlam\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-28T19:13:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T18:54:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png\" \/>\n<meta name=\"author\" content=\"Stephanie Kahlam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stephanie Kahlam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\",\"url\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\",\"name\":\"Targeting XML Values with XPath - Stephanie Kahlam\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png\",\"datePublished\":\"2015-11-28T19:13:04+00:00\",\"dateModified\":\"2023-02-24T18:54:52+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\"},\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage\",\"url\":\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png\",\"contentUrl\":\"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Stellark Home\",\"item\":\"https:\/\/regroove.ca\/stellark\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Targeting XML Values with XPath\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\",\"url\":\"https:\/\/regroove.ca\/stellark\/\",\"name\":\"Stephanie Kahlam\",\"description\":\"Microsoft 365 and SMB.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/stellark\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\",\"name\":\"Stephanie Kahlam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"caption\":\"Stephanie Kahlam\"},\"url\":\"https:\/\/regroove.ca\/stellark\/author\/skahlam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Targeting XML Values with XPath - Stephanie Kahlam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/","og_locale":"en_US","og_type":"article","og_title":"Targeting XML Values with XPath - Stephanie Kahlam","og_description":"Using Nintex Workflow to filter XML Web Request The Goal When using a &#8220;get&#8221; web request to retrieve information from a server, we wanted to use a Nintex Workflow (in SharePoint 2013) filter each item and store the information in a list. Essentially, do as follows: This runs every 5 minutes, allowing us to trigger &hellip;","og_url":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/","og_site_name":"Stephanie Kahlam","article_published_time":"2015-11-28T19:13:04+00:00","article_modified_time":"2023-02-24T18:54:52+00:00","og_image":[{"url":"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png"}],"author":"Stephanie Kahlam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stephanie Kahlam","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/","url":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/","name":"Targeting XML Values with XPath - Stephanie Kahlam","isPartOf":{"@id":"https:\/\/regroove.ca\/stellark\/#website"},"primaryImageOfPage":{"@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage"},"image":{"@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage"},"thumbnailUrl":"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png","datePublished":"2015-11-28T19:13:04+00:00","dateModified":"2023-02-24T18:54:52+00:00","author":{"@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149"},"breadcrumb":{"@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#primaryimage","url":"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png","contentUrl":"https:\/\/mccalec.itgroove.net\/wp-content\/uploads\/sites\/13\/2016\/01\/011916_0219_TargetingXM1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/stellark\/2015\/11\/28\/targeting-xml-values-with-xpath\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Stellark Home","item":"https:\/\/regroove.ca\/stellark\/"},{"@type":"ListItem","position":2,"name":"Targeting XML Values with XPath"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/stellark\/#website","url":"https:\/\/regroove.ca\/stellark\/","name":"Stephanie Kahlam","description":"Microsoft 365 and SMB.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/stellark\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149","name":"Stephanie Kahlam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","caption":"Stephanie Kahlam"},"url":"https:\/\/regroove.ca\/stellark\/author\/skahlam\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/915"}],"collection":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/comments?post=915"}],"version-history":[{"count":1,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/915\/revisions"}],"predecessor-version":[{"id":1434,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/915\/revisions\/1434"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/media?parent=915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/categories?post=915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/tags?post=915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}