当前位置:Gxlcms > mysql > Oraclexml数据构建XMLType相关函数

Oraclexml数据构建XMLType相关函数

时间:2021-07-01 10:21:17 帮助过:94人阅读

准备测试数据: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('


index.jsp
1


index2.jsp
2

'))


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

人气教程排行