我有两个像这样的xml1:
<Title>Sea Change</Title>
<thirdParty_ID></thirdParty_ID>
<Animation_Indicator>N</Animation_Indicator>
<Blackout_Indicator>N</Blackout_Indicator>
<SD_Purchase_Zoe></SD_Purchase_Zoe>
<SD_Purchase_Window_Start_Zoe></SD_Purchase_Window_Start_Zoe>
<SD_Purchase_Window_End_Zoe></SD_Purchase_Window_End_Zoe>
<SD_Licensing_Window_start_Zoe></SD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_start_Zoe>2012-04-01</HD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_end_Zoe>2013-04-01</HD_Licensing_Window_end_Zoe>
<HD_Purchase_Window_Start_Zoe>2012-04-01</HD_Purchase_Window_Start_Zoe>
xml2:
<Asset_Record>
<Title>Sea Change</Title>
<thirdParty_ID></thirdParty_ID>
<Animation_Indicator>N</Animation_Indicator>
<Blackout_Indicator>N</Blackout_Indicator>
<SD_Purchase_Zoe>Y</SD_Purchase_Zoe>
<SD_Purchase_Window_Start_Zoe>2012-04-01</SD_Purchase_Window_Start_Zoe>
<SD_Purchase_Window_End_Zoe>2013-04-01</SD_Purchase_Window_End_Zoe>
<SD_Licensing_Window_start_Zoe>2012-04-01</SD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_start_Zoe></HD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_end_Zoe></HD_Licensing_Window_end_Zoe>
<HD_Purchase_Window_Start_Zoe></HD_Purchase_Window_Start_Zoe>
我想合并 xml1 和 xml2 并输出如下
<Title>Sea Change</Title>
<thirdParty_ID></thirdParty_ID>
<Animation_Indicator>N</Animation_Indicator>
<Blackout_Indicator>N</Blackout_Indicator>
<SD_Purchase_Zoe>Y</SD_Purchase_Zoe>
<SD_Purchase_Window_Start_Zoe>2012-04-01</SD_Purchase_Window_Start_Zoe>
<SD_Purchase_Window_End_Zoe>2013-04-01</SD_Purchase_Window_End_Zoe>
<SD_Licensing_Window_start_Zoe>2012-04-01</SD_Licensing_Window_start_Zoe>
<SD_Licensing_Window_start_Zoe></SD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_start_Zoe>2012-04-01</HD_Licensing_Window_start_Zoe>
<HD_Licensing_Window_end_Zoe>2013-04-01</HD_Licensing_Window_end_Zoe>
<HD_Purchase_Window_Start_Zoe>2012-04-01</HD_Purchase_Window_Start_Zoe>
首先,我需要检查这两个 xml 是否具有相同的标题,如果它们具有相同的标题并将它们合并,如果可以从其中任何一个中找到,则合并所有值。
谢谢您的回复。