0
我有下面的XML输入:提取值当有命名空间
<?xml version="1.0" encoding="UTF-8"?>
<createdInstances xmlns="http://www.company.com/awd/rest/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<folderInstance recordType="folder" id="2017-08-04-04.22.02.446460F01">
<link rel="form" type="application/vnd.company.awd+xml" href="awdServer/awd/services/v1/instances/2017-08-04-04.22.02.446460F01/form" />
<link rel="history" type="application/vnd.company.awd+xml" href="awdServer/awd/services/v1/instances/2017-08-04-04.22.02.446460F01/history" />
</folderInstance>
</createdInstances>
我需要的XPath使用Java的folderInstance
id
值(即2017-08-04-04.22.02.446460F01
在这种情况下)。我试着用下面的表达式,但它不工作。
//createdInstances/[email protected]
任何帮助,将不胜感激。
我没有使用任何XSLT在这里,但我使用Java。如何在java中处理它?任何想法? –
加一个快速响应 –