Trying to loop through XML to extract values in PLSQL
<p>I am trying to loop through XML and extract the UUIDs. I have the following and it is looping through the correct number of times and printing a blank row each time. Why is it not extracting the text value of the UUID node?</p>

<pre><code>   DECLARE
       X XMLTYPE := XMLTYPE('&lt;?xml version="1.0" ?&gt; 
         &lt;StatusUp&gt;
           &lt;G_UUIDs&gt;
               &lt;UUID&gt;1 test 1&lt;/UUID&gt;
               &lt;UUID&gt;2 test 2&lt;/UUID&gt;
               &lt;UUID&gt;3 test 3 &lt;/UUID&gt;
               &lt;UUID&gt;4 test 4 &lt;/UUID&gt;
           &lt;/G_UUIDs&gt;
        &lt;/StatusUp&gt;');
    BEGIN
       FOR r IN (SELECT EXTRACTVALUE(VALUE(p), 'StatusUp/G_UUIDs/UUID/text()') AS uuid

                   FROM TABLE(XMLSEQUENCE(EXTRACT(X, '//StatusUp/G_UUIDs/UUID'))) p)
       LOOP
          DBMS_OUTPUT.PUT_LINE('UUID' || r.uuid);
       END LOOP;
    END;
</code></pre>