Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 在Oracle中获取属性名称的XPath_Xml_Oracle_Xpath - Fatal编程技术网

Xml 在Oracle中获取属性名称的XPath

Xml 在Oracle中获取属性名称的XPath,xml,oracle,xpath,Xml,Oracle,Xpath,我有一个XML文件,例如: <a b="123" c="456"/> 我想使用Oracle SQL中的xpath获取所有属性名和值。执行 select extractvalue(value(p), 'text()') from xmltable('/*/@*' passing xmltype('<a b="123" c="456"/>')) p; 我只得到[123456],但我也想得到[b,c]。我该怎么做?将/*/@*更改为/*/@*/本地名称

我有一个XML文件,例如:

<a b="123" c="456"/>
我想使用Oracle SQL中的xpath获取所有属性名和值。执行

select extractvalue(value(p), 'text()')
  from xmltable('/*/@*' passing xmltype('<a b="123" c="456"/>')) p;
我只得到[123456],但我也想得到[b,c]。我该怎么做?

将/*/@*更改为/*/@*/本地名称