How to use the Query XML Activity in Orchestrator

In this post I will demonstrate how to get the information from inside a XML “tag” with the Orchestrator Activity “Query XML”. To exemplify this I will use the sample XML code below.

 <UserInputs>
  <UserInput Question=”Service Request to change Affected User at” Answer=”&lt;Values Count=&quot;1&quot;&gt;&lt;Value DisplayName=&quot;SR2086 – Default Service Request&quot; Id=&quot;fc9a9841-3e88-cbf3-43dc-1f27cbab680d&quot; /&gt;&lt;/Values&gt;” Type=”System.SupportingItem.PortalControl.InstancePicker” />
  <UserInput Question=”New Affected User” Answer=”&lt;Values Count=&quot;1&quot;&gt;&lt;Value DisplayName=&quot;Jonathan Andersson&quot; Id=&quot;cc40a4b6-b281-34a4-ced7-c27a4677fb9c&quot; /&gt;&lt;/Values&gt;” Type=”System.SupportingItem.PortalControl.InstancePicker” />
</UserInputs>

I will demonstrate how to get the “Question” text and pass it into a text file with Orchestrator.

The XPath Query I will use looks as this: /UserInputs/UserInput/@Question

The example Runbook

How to use the Query XML Activity in Orchestrator1

How to use the Query XML Activity in Orchestrator2

How to use the Query XML Activity in Orchestrator3

The result in the text file

How to use the Query XML Activity in Orchestrator4

 

When developing XPath Queries, freeformmatter.com is a nice place to try them at.

No comments yet.

Leave a Reply