집 >데이터 베이스 >MySQL 튜토리얼 >Oracle xml数据构建 XMLType相关函数
准备测试数据:create table teacher (id varchar2(10),name varchar2(20),remark varchar2(50));create table course (id varch
XMLTRANSFORM(xmltype_instance,xsl_ss):该函数用于将XMLType实例按照XSL样式进行转换,并生成新的XMLType实例。示例如下:
SQL> SELECT XMLTRANSFORM(w.warehouse-spec,x.coll).GetClobVal()
2 FROM warehouse w,xsl_tab x
3 WHERE w.warehouse_name='San Francisco';
CREATE TABLE purchase_order( po_no number(9),po_file xmltype)
insert into purchase_order values(68,XMLTYPE('
'))
SELECT extract(po_file,'out/record/FileName').getStringVal() AS FileName,extract(po_file,'out/record/FileID').getStringVal() AS FileID FROM purchase_order
SELECT extract(po_file,'out/record/@id').getStringVal() AS RECORD FROM purchase_order
SELECT extract(po_file,'out/record/FileName').getStringVal() AS FileName FROM purchase_order
select extractValue(value(i),'/FileName') AS FileName
from purchase_order x,
table(XMLSequence(extract(x.po_file,'out/record/FileName'))) i