我有一个需要根据'OR'拆分的XML。如果我有2个OR,我会分成2 + 1个节点,如[XML2]中所示 [XML1]
<Rules>
<Rule Text="WHEN FamilyCode = 'ABC' AND (PriceDifferentiatorCode In ('DEF', 'GHI') OR ( PriceDifferentiatorCode = 'JKL' AND NameDifferentiatorCode = 'MNO' ) OR (PriceDifferentiatorCode = 'XYZ' AND NameDifferentiatorCode = 'MNO')) THEN 'DummyValue'" />
</Rules>
[XML2]
<Rules>
<Rule RuleText="WHEN FamilyCode = 'ABC' AND PriceDifferentiatorCode In ('DEF', 'GHI') THEN 'DummyValue'" />
<Rule RuleText="WHEN FamilyCode = 'ABC' AND PriceDifferentiatorCode = 'JKL' AND NameDifferentiatorCode = 'MNO' THEN 'DummyValue'" />
<Rule RuleText="WHEN FamilyCode = 'ABC' AND PriceDifferentiatorCode = 'XYZ' AND NameDifferentiatorCode = 'MNO' THEN 'DummyValue'" />
</Rules>