我是 XSLT 世界的新手,但我有 XML:
<Response>
<Campaign Position_Aut="1" Campaign_Id="A" Campaign_Status="Active" >
<Groups Name="gplust_campaign_test_group"></Groups>
<Groups Name="g1"><Position PositionId="1-6MOJ6"></Position></Groups>
</Campaign>
<Campaign Position_Aut="1" Campaign_Id="B" Campaign_Status="Active" >
<Groups Name="g2"></Groups>
</Campaign>
<Campaign Position_Aut="1" Campaign_Id="C" Campaign_Status="Completed" >
</Campaign>
</Response>
我需要更改 xml,所以如果一个 Campaign 有一个 Position,属性 Position_Aut 应该是“0”,而不是“1”,并忽略该 Campaign 的所有子项。这是我需要的 XML 结果:
<Response>
<Campaign Position_Aut="0" Campaign_Id="A" Campaign_Status="Active" ></Campaign>
<Campaign Position_Aut="1" Campaign_Id="B" Campaign_Status="Active" ></Campaign>
<Campaign Position_Aut="1" Campaign_Id="C" Campaign_Status="Completed" ></Campaign>
</Response>
XSLT 应该是什么样子?请您的帮助,如果不清楚,请问我。谢谢,巴克布克。