How to merge all xml files in folder?

A Student

New Member
For example i have a folder which contain multiple xml files with the same data structure. And i want to combine them in one xml file with the following way:Xml 1:\[code\]<root> <child> <child1 state="1"> <Name>name1</Name> <Count>1</Count> <Title>title1</Title> </child1> </child></root>\[/code\]Xml2:\[code\]<root> <child> <child1 state="2"> <Name>name2</Name> <Count>2</Count> <Title>title2</Title> </child1> </child></root>\[/code\]Expected result:\[code\]<root> <child> <child1 state="1"> <Name>name1</Name> <Count>1</Count> <Title>title1</Title> </child1> <child1 state="2"> <Name>name2</Name> <Count>2</Count> <Title>title2</Title> </child1> </child></root>\[/code\]I want to use Python. I read this Merge multiple XML files from command line, but it gives not exectly what i want:( Can anyone help me to solve this?
 
Back
Top