合并两个XML文件

时间:2013-10-07 11:44:23

标签: xml xslt

我正在尝试合并两个XML文件:

1st XML:

<data>
  <text>
    <description>this is my description</description>
    <title>this is my title</title>
  </text>
  <text>
    <description>this <other>is my other description</other></description>
    <title>this is my title</title>
  </text>
</data>

第二个XML:

<data>
  <text>
    <description>this is my <tag>description</tag></description>
  </text>
  <text>
    <description>this is <tag>my other description</tag></description>
  </text>
</data>

OUPUT希望:

<data>
  <text>
    <description>this is my <tag>description</tag></description>
    <title>this is my title</title>
  </text>
  <text>
    <description>this <other>is <tag>my other description</tag></other></description>
    <title>this is my title</title>
  </text>
</data>

我使用并改编了这里给出的XSLT: how to compare and merge two xml using xslt

但我无法将OTHER和TAG一起添加到DESCRIPTION中。

提前致谢。

0 个答案:

没有答案