0
有什麼方法通過更改或添加基於節點兄弟/子值的屬性來修改XML?如何使用基於xml節點sibligs值的XSLT修改或添加XML屬性?
我需要改變:
<FieldMatchResult FieldName="Record_Amount">
爲以下之一:
<FieldMatchResult FieldName="Record_1_Amount">
或
<FieldMatchResult FieldName="Record_Amount" Tag="Record_1_Amount">
這裏是我的樣品,我需要從拉出值「行索引「元素
<?xml version="1.0"?>
<ArtifactMatchResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<SubArtifacts>
<ArtifactMatchResult ArtifactName="Data Record">
<Fields>
<FieldMatchResult FieldName="Record_Amount">
<Values>
<anyType xsi:type="xsd:double">123456.5</anyType>
</Values>
</FieldMatchResult>
<FieldMatchResult FieldName="Record_Rate" >
<Values>
<anyType xsi:type="xsd:double">1.25</anyType>
</Values>
</FieldMatchResult>
<FieldMatchResult FieldName="Row Index">
<Values>
<anyType xsi:type="xsd:double">1</anyType>
</Values>
</FieldMatchResult>
</Fields>
<SubArtifacts />
</ArtifactMatchResult>
<ArtifactMatchResult ArtifactName="Data Record">
<Fields>
<FieldMatchResult FieldName="Record_Amount">
<Values>
<anyType xsi:type="xsd:double">123456.5</anyType>
</Values>
</FieldMatchResult>
<FieldMatchResult FieldName="Record_Rate" >
<Values>
<anyType xsi:type="xsd:double">1.25</anyType>
</Values>
</FieldMatchResult>
<FieldMatchResult FieldName="Row Index">
<Values>
<anyType xsi:type="xsd:double">2</anyType>
</Values>
</FieldMatchResult>
</Fields>
<SubArtifacts />
</ArtifactMatchResult>
</SubArtifacts>
</ArtifactMatchResult>
非常感謝任何指針。
究竟你 「*基於節點的兄弟姐妹/子值*」 是什麼意思?請提供明確的標準:如果這樣,那麼,否則別的東西。 –