2012-07-26 49 views
0

什么是正确的XPath表达式来过滤所述两个描述值超出下面的XML的:解析的Xpath 2的xsi:type =“术语:术语”

<course> 
    <description>This is a description of the course</description> 
    <description xsi:type="learning:outcome">This is the description of the learning outcome of the course</description> 
</course> 

我认为正确的XPath本来:

//course/description[@xsi:type=""] 
//course/description[@xsi:type="learning:outcome"] 

但XMLSpy的或我在Drupal 进口商任何建议,将不胜感激尝试时,这不起作用。

回答

0

我想你错误键入了xsi:type作为xsi:路径。

此外,您需要确保xsi名称空间在XPath上下文中声明。