Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to Check Value of XMLType ?

How to Check Value of XMLType ?

From: narino <Narino_at_mailinator.com>
Date: Sat, 12 May 2007 00:04:54 -0500
Message-ID: <134af935ljd1mdd@corp.supernews.com>


10gR2

I get a XMLType fragment from a SELECT like:

SELECT xmlelement("people",....)

     INTO l_xmltype
   FROM dual;

Result is either like this for example, a "full" chunk of XML:

<people>
  <author>
<firstname>Robert</firstname>
<surname>Frost</surname>
<address>

      <email>xxx_at_xxx.xxx</email>
</address>

  </author>
</people>

Or when no records found:

<people></people>


I want to check what type of result I get :

IF l_xmltype = '<people></people>' THEN

    DBMS_OUTPUT.PUT_LINE('no record found'); ELSE

How to do this ?

Thanks Received on Sat May 12 2007 - 00:04:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US