Oracle:如何使用XMLElement()在特定名称空间中创建元素 [英] Oracle: How to create an element in a specific namespace with XMLElement()
本文介绍了Oracle:如何使用XMLElement()在特定名称空间中创建元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Oracle中,您可以使用 XMLElement()函数来创建元素,如:
In Oracle, you can use the XMLElement() function to create an element, as in:
XMLElement('name', 'John')
但是如何在特定名称空间中创建元素?例如,如何创建以下元素:
But how to create an element in a specific namespace? For instance, how to create the following element:
<my:name xmlns:my="http://www.example.com/my">John</my:name>
推荐答案
代替XMLElement()
使用:
XMLType('<my:name xmlns:my="http://www.example.com/my">John</my:name>')
是的,就是这么简单.
这篇关于Oracle:如何使用XMLElement()在特定名称空间中创建元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文