Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xml table result return null value

949888Jul 17 2012 — edited Jul 17 2012
My XML File Look Like this

<?xml version="1.0" encoding="UTF8"?>
<badges>
<row>
<UserId>3718</UserId>
<Name>Teacher</Name>
</row>
<row>
<UserId>3719</UserId>
<Name>Teacher</Name>
</row>
<row>
<UserId>3720</UserId>
<Name>Teacher</Name>
</row>
</badges>

the statement i execute is

SELECT UserId, Name
FROM (SELECT XMLTYPE(bfilename('XMLDIR', '123_1.xml'),
nls_charset_id('UTF8')) xml_data
FROM dual),
XMLTable('for $i in /badges/row
return $i'
passing xml_data
columns UserId NUMBER path '@UserId',
Name VARCHAR2(50) path '@Name');

Result show

null null
null null
null null

what wrong with my statement?

help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2012
Added on Jul 17 2012
1 comment
1,100 views