0
我有下面的xml,我無法使用xmlquery獲取LocationOfNode。任何建議如何進行?請看下面的例子,看看我想達到什麼。Oracle XmlQuery檢索節點的路徑
<data>
<type id="01" desc="Doctors">
<type id="02" desc="Private Hospital">
<type id="03" desc="John"></type>
<type id="04" desc="James"></type>
</type>
<type id="05" desc="Public Hospital">
<type id="06" desc="Jacob"></type>
<type id="07" desc="Joseph"></type>
</type>
</type>
<type id="08" desc="Actors">
........
</type>
</data>
例子:
如果我輸入的是:07
預期成果是:醫生/公立醫院/約瑟夫
我嘗試使用下面xmlpath中與XMLQUERY
SELECT XMLQuery(
'//*[@id="07"]/ancestor::*[@id="01"][1]'
PASSING MYXMLClob RETURNING CONTENT
) "myXMLQuery"
FROM myTable