【发布时间】:2015-05-15 12:20:03
【问题描述】:
输入 XML
<major>
<minor>
<line_id>12345</line_id>
<service_Line>
<line_id>1111</line_id>
<product_id>56789</product_id>
</service_Line>
<service_Line>
<line_id>22222</line_id>
</service_Line>
<service_Line>
<line_id>3333</line_id>
<product_id>23456</product_id>
<product_id>999999</product_id>
</service_Line>
<service_Line>
<line_id>4444</line_id>
</service_Line>
</minor>
<service_Line>
<line_id>5555</line_id>
<product_id>666666</product_id>
<product_id>121212</product_id>
</service_Line>
<service_Line>
<line_id>5555</line_id>
</service_Line>
</major>
来自上述 XML
我想要service_line标签的line_id和Product_id,忽略service_line标签中没有product_id的line_id
所以我需要以下信息
所以我需要以下信息
输出-
服务热线 -- 1111
Product_id -- 56789
服务热线 -- 3333
Product_id -23456
Product_id - 999999
服务热线 -- 5555
Product_id -666666
Product_id - 121212`
甲骨文版本: PLSQL 版本 11.2.0.3.0 - 生产
【问题讨论】:
-
我需要这样的输出
-
所以我需要以下信息 Service LINE -- 1111 Product_id -- 56789 Service Line -- 3333 Product_id -23456 Product_id - 999999 Service Line -- 5555 Product_id -666666 Product_id - 121212`
-
“在应用程序代码中使用 XPath 或 XML 解析器”是否可行?因为试图在 Oracle 中处理 XML... ew。 =(
-
嘿... Jpmc,我用谷歌搜索了它,但无法获得此输出.. 请帮助
标签: xml oracle plsql plsqldeveloper