0
我有以下的XML文档的XPath发现的根元素标签
<root>
<subject>This is the subject</subject>
<email>
<subject>Email's Subject</subject>
</email>
</root>
如何只能选择根元素下的“主题”标签?我不想从“电子邮件”节点获取主题。
谢谢!
编辑:此外,因为'根'元素是动态的,我怎么不指定'根'标记创建xpath?我试过/主题,//主题和// * /主题。没有工作。
我以为我试过那条路。我尽快更新回应 – Dan