title: Getting values from XML in SSIS
body: <p>I have data in XML like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-16"?&gt;
  &lt;APIDATA xmlns="api-com"&gt;
  &lt;ORDER EngineID="1" OrderID="66"&gt;&lt;/ORDER&gt;
  &lt;ORDER EngineID="2" OrderID="67"&gt;&lt;/ORDER&gt;
  &lt;/APIDATA&gt;
  </code></pre>
  
  <p>In SSIS control flow, i would like to loop on the orders. I need the two IDs form the order elements for later use. I use a Foreach loop component, with Foreach NodeList Enumerator. </p>
  
  <pre><code>Enumeration type: NodeText
  OuterXpathString: //@EngineID | //@OrderID 
  </code></pre>
  
  <p>Then on variable mappings I use two string variables with index 0 and 1, to get the two IDs. To my woe, the variable values are not what I expect, they are inverted in some way. They appear as the following:</p>
  
  <pre><code>loop sequence 1: variable1 = 1, variable2 = 2
  loop sequence 2: variable1 = 66, variable2 = 67
  </code></pre>
  
  <p>This is incorrect, as I would like to execute tasks in a loop, using the IDs of a single ORDER element. (So I would like to get loop sequence 1: variable1 = 1, variable2 = 66.) How can I achieve this? Is something fundamentally wrong with my xpath?</p>
  
  <p>Thanks for the help.</p>