C# 从序列化的WCF xml配置文件中选择节点

C# 从序列化的WCF xml配置文件中选择节点,c#,xml,xpath,C#,Xml,Xpath,我已经多年没有使用XPath了,需要一些指导 以下是xml片段: <?xml version="1.0" encoding="utf-8"?> <ConfigurationObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="1" i:type="AlgorithmDataSourceConfiguration" xmlns:z="http://schemas.microsoft.com/2003/10

我已经多年没有使用XPath了,需要一些指导

以下是xml片段:

<?xml version="1.0" encoding="utf-8"?>
<ConfigurationObject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="1" i:type="AlgorithmDataSourceConfiguration" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://www.foo.com/bar/2008/03">
  <ConfigurationSection z:Id="2">
    <Type z:Id="3">
      <Name z:Id="4">AlgorithmDataSource</Name>
该列表不包含任何节点


您认为呢?

根据您提供的xml片段,xpath:

//ConfigurationObject/ConfigurationSection[@z:Id='2']
将选择第一个ConfigurationSection节点

//ConfigurationObject/ConfigurationSection[@z:Id='2']