我正在寻找一种仅使用 Xpath 2.0 获取以下字符串的方法:
AAA-Site-1.test.com,BBB-Site-1.test.com
<SystemRoot SystemName='Xpath Test'>
<SystemRoot SystemDomain='test.com' SystemName='AAA-Site-1'>
<Product InstallDate='11/01/2012' ProductName='AAA'/>
</SystemRoot>
<SystemRoot SystemDomain='test.com' SystemName='BBB-Site-1'>
<Product InstallDate='11/01/2012' ProductName='BBB'/>
</SystemRoot>
</SystemRoot>
我尝试了 concat 然后字符串连接,但我得到“太多值”......
concat(/SystemRoot/SystemRoot/@SystemDomain,'.',/SystemRoot/SystemRoot/@SystemName)
是否可以仅通过使用 XPath 2.0 来实现?