title: Parsing XML file to run Labview Program
body: <p>I have been given XML-Files that are to be used to run a machine, the interface is via Labview. So far, I have only found Labview parsing that relates to XML data structures, where the nodes are known and always have the same amount of data. In my case, the XML is comprised of a number of "steps" and "conditions", where the steps are to be completed one after the other and the next step is only started when "conditions" are fulfilled. The XML format is like this. </p>
  
  <pre><code>&lt;header attribute_1&gt;
      &lt;headerNode_1&gt;value_1&lt;/headerNode_1&gt;
      &lt;headerNode_2&gt;value_2&lt;/headerNode_2&gt;
  &lt;/header&gt;
  
  &lt;step id="1"&gt;
      &lt;condition&gt;
           &lt;conditionToBeChecked_1&gt;Condition_Value_1&lt;/conditionToBeChecked_1&gt;
      &lt;/condition&gt;
      &lt;DoThings&gt;
          &lt;ThingToDo_1&gt;Thing_Value_1&lt;/ThingToDo_1&gt;
          &lt;ThingToDo_2&gt;Thing_Value_2&lt;/ThingToDo_2&gt;
      &lt;/DoThings&gt;
  &lt;/step&gt;
  
  &lt;step id="2"&gt;
      &lt;condition&gt;
           &lt;conditionToBeChecked_2&gt;Condition_Value_2&lt;/conditionToBeChecked_2&gt;
           &lt;conditionToBeChecked_3&gt;Condition_Value_3&lt;/conditionToBeChecked_3&gt;
      &lt;/condition&gt;
      &lt;DoThings&gt;
          &lt;ThingToDo_3&gt;Thing_Value_3&lt;/ThingToDo_3&gt;
          &lt;ThingToDo_4&gt;Thing_Value_4&lt;/ThingToDo_4&gt;
          &lt;ThingToDo_5&gt;Thing_Value_5&lt;/ThingToDo_5&gt;
      &lt;/DoThings&gt;
  &lt;/step&gt;
  </code></pre>
  
  <p>ad infinitum...</p>
  
  <p>I am still wondering how to start. I could either convert this into a string and look for specific keywords, or build a highly convoluted case structure and try to catch all nodes linearly. Are there any more elegant options?</p>