有没有办法使用 XSLT 1.0 将 xml1 转换为 xml2?
xml1:
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>010</ITEM_NUMBER>
</E1BPBUSISM008_ITEM_OUT>
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>020</ITEM_NUMBER>
</E1BPBUSISM008_ITEM_OUT>
<E1BPBUSISM008_ITEM_AD_OUT>
<ITEM_NUMBER>010</ITEM_NUMBER>
<AD_SPEC_NO>000001</AD_SPEC_NO>
</E1BPBUSISM008_ITEM_AD_OUT>
<E1BPBUSISM008_ITEM_AD_OUT>
<ITEM_NUMBER>020</ITEM_NUMBER>
<AD_SPEC_NO>000002</AD_SPEC_NO>
</E1BPBUSISM008_ITEM_AD_OUT>
<E1BPBUSISM008_AD_SPEC_AD_OU>
<AD_SPEC_NO>000001</AD_SPEC_NO>
<KEYWORD>key1</KEYWORD>
</E1BPBUSISM008_AD_SPEC_AD_OU>
<E1BPBUSISM008_AD_SPEC_AD_OU>
<AD_SPEC_NO>000002</AD_SPEC_NO>
<KEYWORD>key2</KEYWORD>
</E1BPBUSISM008_AD_SPEC_AD_OU>
进入xml2:
<Ad>
<ad-number>010</ad-number>
<keyword>key1</keyword>
</Ad>
<Ad>
<ad-number>020</ad-number>
<keyword>key2</keyword>
</Ad>
如果无法进行直接转换,则将xml1合并为以下内容会有所帮助:
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>010</ITEM_NUMBER>
<KEYWORD>key1</KEYWORD>
</E1BPBUSISM008_ITEM_OUT>
<E1BPBUSISM008_ITEM_OUT>
<ITEM_NUMBER>020</ITEM_NUMBER>
<KEYWORD>key2</KEYWORD>
</E1BPBUSISM008_ITEM_OUT>