xml处理命名空间

如下xml文件:
<UDDIResults>
<result>
<urn:coveragePeriod>
<urn:startPoint xsi:type="xsd:dateTime">2009-02-03T07:21:43.000Z</urn:startPoint>
<urn:endPoint xsi:type="xsd:dateTime">2009-02-03T07:22:43.000Z</urn:endPoint>
</urn:coveragePeriod>
</result>
</UDDIResults>

获取节点startPoint的xpath表达式为:

List list = doc.selectNodes("/UDDIResults/result/*[local-name()='coveragePeriod']/*[local-name()='startPoint']" );

你可能感兴趣的:(xml)