[阅读: 368] 2008-04-24 01:15:07
XPath is a query mechanism for XML. It allows us to query and navigate a document’s contents using simple strings to specify what nodes we’re interested in selecting based on a set of criteria. For example, the XPath expression //myNode will return all occurrences of the element named myNode anywhere in the document.
XPath是针对XML的一种查询机制。它允许我们利用简单的字符串来表示一组查询条件,指定我们想选择哪些感兴趣的节点,从而实现文档内容的查询和导航。例如,XPath表达式//myNode将返回文档中出现的所有名称为myNode的元素。