title: Using a SSIS XML Source store relative xml elements
body: <p>Using a SSIS XML Source I would like to read the following XML</p>
  
  <pre><code>&lt;Stock&gt;
    &lt;OnHand&gt;1&lt;/OnHand&gt;
    &lt;Proximity&gt;xx&lt;/Proximity&gt;
    &lt;Reserved&gt;2&lt;/Reserved&gt;
    &lt;Proximity&gt;yy&lt;/Proximity&gt;
    &lt;OnOrder&gt;3&lt;/OnOrder&gt;
    &lt;Proximity&gt;zz&lt;/Proximity&gt;
    &lt;Cbo&gt;4&lt;/Cbo&gt;
    &lt;Proximity&gt;zz&lt;/Proximity&gt;
  &lt;/Stock&gt;
  </code></pre>
  
  <p>The XML cannot be changed because it is an international standard called <code>Onix</code>.</p>
  
  <p>As you can see there is a Proximity after each row.</p>
  
  <p>I would somehow like to store them in the right order, or call the Proximity after <code>OnHand</code> for <code>OnHandProximity</code>.</p>
  
  <p>The schema that follows this XML looks like this:</p>
  
  <pre><code>&lt;xs:sequence&gt;
    &lt;xs:element ref="OnHand" /&gt;
    &lt;xs:element minOccurs="0" ref="Proximity" /&gt;
    &lt;xs:sequence minOccurs="0"&gt;
      &lt;xs:element ref="Reserved" /&gt;
      &lt;xs:element minOccurs="0" ref="Proximity" /&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:sequence minOccurs="0"&gt;
      &lt;xs:element ref="OnOrder" /&gt;
      &lt;xs:element minOccurs="0" ref="Proximity" /&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:sequence minOccurs="0"&gt;
      &lt;xs:element ref="CBO" /&gt;
      &lt;xs:element minOccurs="0" ref="Proximity" /&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:sequence&gt;
  </code></pre>
  
  <p>Unfortunately this correctly gives this error in SSIS XML Source:</p>
  
  <blockquote>
    <p>The XML Source was unable to process the XML data. Ambiguous complexType definition.  The element "stock" has multiple members named "Proximity".</p>
  </blockquote>
  
  <p>And my question is of course if anyone have suggestions for handling XML like this without loosing the information that the relative position is.</p>
  
  <p>There also is detail that the lines are not mandatory, but I think a first solution can ignore that detail.</p>