我在插入xmltype到pl/sql中的指定位置的另一个xmltype时遇到问题。将xmltype插入到指定位置的xmltype中[PL/SQL]
第一个变量v_xml的形式为:
<ord>
<head>
<ord_code>123</ord_code>
<ord_date>01-01-2015</ord_date>
</head>
</ord>
而第二v_xml2:
<pos>
<pos_code>456</pos_code>
<pos_desc>description</pos_desc>
</pos>
我的目的是得到这样的:
<ord>
<head>
<ord_code>123</ord_code>
<ord_date>01-01-2015</ord_date>
</head>
<!-- put the second variable in this place - after closing <head> tag -->
<pos>
<pos_code>456</pos_code>
<pos_desc>description</pos_desc>
</pos>
</ord>
我768,16做些什么我的代码?
declare
v_xml xmltype;
v_xml2 xmltype;
begin
-- some code
-- some code
-- v_xml and v_xml2 has the form as I define above
end;
有人能帮我解决这个问题吗?据我所知有功能,如insertchildxml,appendchildxml或类似这样的... 我发现纯SQL的几个解决方案,但我不知道如何在PL/SQL中移动它。
谢谢!
谢谢你的时间,它的工作原理! :) – llepec