我有一个要求,我需要将旧的xml转换为新的xml,这是我的两个 旧XML:
<Comments>
<checkintext>
<bpcheckdeviated>true</bpcheckdeviated>
<task>
<id>CS-2213</id>
<bugtrackid></bugtrackid>
<name>Cannot delete the picking lists (lines)</name>
<version>6.2.1000.4051</version>
<sprint>17.8</sprint>
<project>Cs2213_Prd_DelPickIssue</project>
<area>Production</area>
<taskstatus>Closed</taskstatus>
</task>
<text>1. Issue with delete of picking list is fixed. The creation of picking list was creating mess in the inventTrans. This is also fixed.</text>
<notes>
<note>
<section>Info</section>
<component>axs</component>
<text>hello</text>
</note>
<notes>
</checkintext>
</Comments>
以下是新xml应该如何,但数据必须相同:
<Details>
<CheckBestPractices>true</CheckBestPractices>
<Task Id="Cs-2213">
<Name>Cannot delete the picking lists (lines)</Name>
<Version>6.2.1000.4051</Version>
<Sprint>17.8</Sprint>
<Project>Cs2213_Prd_DelPickIssue</Project>
<Area>Production</Area>
<Status>Closed</Status>
<BugTrackId/>
</Task>
<Text><![CDATA[Issue with delete of picking list is fixed. The creation of picking list was creating mess in the inventTrans. This is also fixed.]]> </Text>
<SpecialNotes>
<Note>
<Component/>
<Section></Section>
<Text><![CDATA[ <here your text> ]]> </Text>
</Note>
</SpecialNotes>
</Details>
我怎么能这样做是有办法做到的?