title: Parse XML using T-SQL and XQUERY - Searching for specific values
body: <p>I have some properties of an application being passed to me in XML form. I need to parse out the property by name and assign the value to the appropriate column in my database.</p>
  
  <p>I am currently parsing it out in a SSIS script component but it takes way to long to complete. I was hoping there would be an easy solution for this using XQUERY, but I cannot find what I am looking for.</p>
  
  <p>Here is an example of the xml I am receiving:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;property&gt;
          &lt;name&gt;DISMISS_SETTING&lt;/name&gt;
          &lt;value&gt;DEFAULT&lt;/value&gt;
      &lt;/property&gt;
      &lt;property&gt;
          &lt;name&gt;SHOW_SETTING&lt;/name&gt;
          &lt;value&gt;DEFAULT&lt;/value&gt;
      &lt;/property&gt;
      &lt;property&gt;
          &lt;name&gt;DEFAULT_SETTING&lt;/name&gt;
          &lt;value&gt;DEFAULT&lt;/value&gt;
      &lt;/property&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>So, if I were looking at the first property element I would assign the value DEFAULT to my DISMISS_SETTING column in my database. Also, it's important to note the order and combinations of the values can come across in no specific order.</p>