title: PL/SQL: Loop Through XML Column and Extract Value From Duplicate Elements
body: <p>I have a SQL table that contains an XMLType column. I need to iterate through each row and extract values from the column.</p>
  
  <p>The XML contain multiple children with the same will look like this:</p>
  
  <pre><code>&lt;parent&gt;
    &lt;child&gt;Test&lt;/child&gt;
    &lt;child&gt;Test1&lt;/child&gt;
    &lt;child&gt;Test2&lt;/child&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>My goal is to take the value from each child and append to a string. However, I am having issues extracting the value.</p>
  
  <p>My current solution:</p>
  
  <pre><code>DECLARE
    sample VARCHAR(2000);
  BEGIN
    FOR row IN (SELECT xml_column FROM table)
    LOOP
      FOR child in (SELECT EXTRACT('/parent/child') ...
      LOOP
        ....
      END LOOP;
    END LOOP;
  END;
  </code></pre>
  
  <p>My first issue is I cannot seem to get the individual values. I've used both EXTRACT and EXTRACTVALUE but the best I've gotten is 'TEST1TEST2...'. </p>
  
  <p>Second, if I try using <code>row.XML_COLUMN</code> it complains that it does not exist.</p>