What is the fastest way to combine two xml files into one

后端 未结 11 1560
广开言路
广开言路 2020-11-29 01:43

If I have two string of xml1 and xml2 which both represent xml in the same format. What is the fastest way to combine these together? The format is not important, but I ju

11条回答
  •  清歌不尽
    2020-11-29 02:10

    Best solution to me, based on Jose Basilio answer, slightly modified,

    var combinedUnique = xml1.Descendants()
        .Union(xml2.Descendants());
    combinedUnique.First().Save(#fullName)
    

提交回复
热议问题