2012-07-26 47 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上下文中聲明。