Xml命名空间打破我的xpath!

我有以下XML:
<List xmlns="http://schemas.microsoft.com/sharepoint/soap/">
 <Fields>
   <Field>
   </Field>
 </Fields>
</List>

这是从SharePoint Web服务返回的XML的精简版本。我也有以下xPath:

/List/Fields/Field

当我从我的XML删除xmlns xPath工作正常。当它在我的xPath找不到任何东西。有什么我应该做不同的我的xPath?修改XML不是一个选项。

I also have the following xPath:

06000

When I remove the xmlns from my XML
the xPath works fine. When it’s in
there my xPath finds nothing

如果你不能注册一个命名空间绑定,不能使用(假设注册的前缀是“x”):

/x:List/x:Fields/x:Fiels

那么还有另一种方法:

/*[name()='List']/*[name()='Fields']/*[name()='Field']

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念