输入XML中提取XML:忽略某些节点
<Hierarchy><Relation>
<Child>
<Name>XYZ</Name>
<Age>10</Age>
</Child>
<IsEldest>True</IsEldest>
</Relation>
<Relation>
<Child>
<Name>ABC</Name>
<Age>5</Age>
</Child>
</Relation>
<Relation>
<Child>
<Name>PQR</Name>
<Age>3</Age>
</Child>
</Relation></Hierarchy>
预期结果:
<Relation>
<Child>
<Name>ABC</Name>
<Age>5</Age>
</Child>
</Relation>
<Relation>
<Child>
<Name>PQR</Name>
<Age>3</Age>
</Child>
</Relation>
我们怎样才能在一个SQL XML查询使用SQL Server检索预期的结果。 应该提取没有IsEldest标签的节点。 使用@ xml.modify可以选择删除与IsEldes节点的关系标记。但任何其他方法提取所需的XML?
其他e是'真 '的出现,其值为“真”以外的值?在这种情况下应该发生什么? –
Shnugo