title: how to select data with a attribute from xml columns in postgres
body: <p>I have a following xml content:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;h:head&gt;
      &lt;h:title&gt;Demo12&lt;/h:title&gt;
      &lt;model&gt;
        &lt;instance&gt;
          &lt;uploaded_form_bpdwls id="Demo12"&gt;
            &lt;formhub&gt;
              &lt;uuid/&gt;
            &lt;/formhub&gt;
            &lt;Household_Number/&gt;
            &lt;Survey_Name/&gt;
            &lt;start/&gt;
            &lt;end/&gt;
            &lt;meta&gt;
              &lt;instanceID/&gt;
            &lt;/meta&gt;
          &lt;/uploaded_form_bpdwls&gt;
        &lt;/instance&gt;
      &lt;/model&gt;
    &lt;/h:head&gt;
    &lt;h:body&gt;
      &lt;input ref="/uploaded_form_bpdwls/Household_Number"&gt;
        &lt;label&gt;Household Number&lt;/label&gt;
      &lt;/input&gt;
      &lt;input ref="/uploaded_form_bpdwls/Survey_Name"&gt;
        &lt;label&gt;Survey Name&lt;/label&gt;
      &lt;/input&gt;
    &lt;/h:body&gt;
  &lt;/h:html&gt;
  </code></pre>
  
  <p>In above XML content,</p>
  
  <ul>
  <li><p>inside body, there are two input tags with different attributes (i.e. @ref="/uploaded_form_bpdwls/Household_Number). </p></li>
  <li><p>I am trying to select data in table format through postgresSQL. I want "House Hold" and "Survey Name" as separate columns. </p></li>
  <li><p>I don't have an idea how to select data using attribute of tags.</p></li>
  </ul>
  
  <p>Is it possible to select data under separate columns</p>
  
  <p>What should be the select query to achieve this?</p>