Pythonを使用してxmlファイルを追加する方法を教えてもらえますか
これは私のfile1.xmlです
<?xml version="1.0"?>
<addressbook>
<person>
<name>Eric Idle</name>
<phone type='fix'>999-999-999</phone>
<phone type='mobile'>555-555-555</phone>
<address>
<street>12, spam road</street>
<city>London</city>
<zip>H4B 1X3</zip>
</address>
</person>
</addressbook>
そしてそれを別のxmlファイルに追加したい
<?xml version="1.0"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
私のためにこれを行うことができるモジュールはありますか...
必要な出力は次のとおりです。
<addressbook>
<person>
<name>Eric Idle</name>
<phone type='fix'>999-999-999</phone>
<phone type='mobile'>555-555-555</phone>
<address>
<street>12, spam road</street>
<city>London</city>
<zip>H4B 1X3</zip>
</address>
</person>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
</addressbook>
そして今のところ私はファイルからxmlを読み取る必要がありますが、後でサーバーからxml応答を取得し、それを1つのxmlファイルに変換する必要があります。