c# - How to merge elements from two XML files? -
i need c# lang code merge 2 xml files one, specified content.
xml file 1 :
<exchange-documents> <documentlegal> <bibliographic-data> <applicants> <applicant-name> <name>century products co [us]</name> </applicant-name> </applicants> </bibliographic-data> </documentlegal> </exchange-documents>
xml file 2:
<exchange-documents> <documentpatent> <bibliographic-data> <applicants> <applicant-name> <name>century products co [us]</name> </applicant-name> </applicants> </bibliographic-data> </documentpatent> </exchange-documents>
i need read above 2 xml files , write new xml files selected elements?
output xml:
<documentlegal> <bibliographic-data> <applicants> <applicant-name> <name>century products co [us]</name> </applicant-name> </applicants> </bibliographic-data> </documentlegal> <documentpatent> <bibliographic-data> <applicants> <applicant-name> <name>century products co [us]</name> </applicant-name> </applicants> </bibliographic-data> </documentpatent>
i dont need exchnage document element. can provide me c# code achiev above scenario?
read merging xml files, schema validation, , more on msdn.
Comments
Post a Comment