如何在Oracle数据库的CLOB中包含的xml中添加属性? [英] How do I add an attribute to xml contained within a CLOB in an Oracle database?

查看:125
本文介绍了如何在Oracle数据库的CLOB中包含的xml中添加属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为Oracle数据库的CLOB中包含的xml添加属性?我可以使用UpdateXML函数来更新现有属性,但不会添加一个.

How do I add an attribute to xml contained within a CLOB in an Oracle database? I can use the UpdateXML function to update an existing attribute but it will not add one.

推荐答案

您可以结合使用deleteXml()appendChildXml()insertChildXml()insertXmlBefore()来删除现有节点,然后重新重新添加它,现在添加了新属性.

You could use a combination of deleteXml() along with either appendChildXml(), insertChildXml(), or insertXmlBefore() to remove the existing node and then re-add it back with the new attribute now included.

这篇关于如何在Oracle数据库的CLOB中包含的xml中添加属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆