【发布时间】:2013-01-16 15:24:36
【问题描述】:
我有下面的xml
<?xml version="1.0"?>
<response status="200">
<ns3:output xmlns="http://xmlns.oracle.com/apps/fnd/wf/worklist/service/rt/artifacts/notificationdetails/"
xmlns:ns2="http://xmlns.oracle.com/apps/fnd/wf/worklist/service/rt/artifacts/worklistmgmt/"
xmlns:ns3="http://xmlns.oracle.com/apps/fnd/wf/worklist/service/rt/artifacts/worklist/">
<ns2:notifications count="140552">
<ns2:notification>
<ns2:NotificationId>4687807</ns2:NotificationId>
</ns2:notification>
</ns2:notifications>
</ns3:output>
</response>
我需要解析它并获取每一行的 NotificationId 值。 我尝试使用下面的代码来获取列表,但它返回 0。
notificationrows = xmlDoc.documentElement.selectNodes("/ns3:output/ns2:notifications");
谁能告诉我如何做到这一点?
【问题讨论】:
-
你使用什么语言?
标签: xml parsing namespaces