我有一个输入 XML 如下
输入 XML
<description-page>
<noted>12000 </noted>
<noted>15000</noted>
<noted>NOTE</noted>
</description-page>
<idescription-note>
<noted>12000</noted>
<noted>15000</noted>
<noted>ENG CHG</noted>
</idescription-note>
我想我的输出为
<sample>
<input>
<noted>12000</noted>
<noted>12000</noted>
</input>
<input>
<noted>15000</noted>
<noted>15000</noted>
</input>
<input>
<noted>NOTE</noted>
<noted>ENG CHG</noted>
</input>
</sample>
所以这里每个 description-page (noted) 都需要 idescription-note (noted) 元素
我现在正在做的是在 xslt
<xsl-template match="description-page | idescription-note>
这就是我尝试 xslt 的方式,但我并没有在如何匹配两个节点方面遇到困难。
请在这里指导我。
问候卡西克