C# .net xdt转换仅替换第一个匹配项

C# .net xdt转换仅替换第一个匹配项,c#,.net,xml,visual-studio,xdt-transform,C#,.net,Xml,Visual Studio,Xdt Transform,我有一个正在转换的配置文件: <?xml version="1.0" encoding="utf-8"?> <TopNode> <Sub> <subnode>aaaa</subnode> <othernode>sdfsfsdfsd</othernode> </Sub> <Sub> <subnode>aaaa</subnode>

我有一个正在转换的配置文件:

<?xml version="1.0" encoding="utf-8"?>
<TopNode>
  <Sub>
    <subnode>aaaa</subnode>
    <othernode>sdfsfsdfsd</othernode>
  </Sub>
  <Sub>
    <subnode>aaaa</subnode>
    <othernode>iiiiiii</othernode>
  </Sub>
  <Sub>
    <subnode>aaaa</subnode>
    <othernode>blahblahblahblabhlahb</othernode>
  </Sub>
  <Sub>
    <subnode>aaaa</subnode>
    <othernode>sdfsdfseeferererer</othernode>
  </Sub>  
</TopNode>

aaaa
SDFSD
aaaa
三
aaaa
布拉布拉布拉布拉布拉布拉布拉布
aaaa
SDFSDFSeeferer
我有这样的转变:

<?xml version="1.0" encoding="utf-8" ?>
<TopNode xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <Sub>
    <subnode xdt:Transform="Replace">replaceallwiththis</subnode>
  </Sub>
</TopNode>

用这个代替
它仅替换第一个子节点匹配。我如何让它取代所有

我也尝试这样做,但没有工作:

<subnode xdt:Locator="Condition(.)" xdt:Transform="Replace">replaceallwiththis</subnode>
replaceallwiththis
我也试过,但她没有工作(只替换第一场比赛):

zzzzzzzzzzzzzzz

你能举个例子吗?感谢您的回复!你可以用
<subnode xdt:Locator="XPath(//TopNode/Sub[subnode='aaaa']/subnode)" xdt:Transform="Replace">zzzzzzzzzzzzzzzzzzz</subnode>