I have this weird XML document that contains Phone number details, I need to export this into a CSV document but the problem is it's not formatted correctly. All of the elements are inside of </ string> tags and some "Name" fields are repeated but not in the exact same way (like in the example below, most repeated lines contain extra spaces or commas). And all the "Numbers" are indented from the "Name" fields.
<string>example1</string>
<string>014584111</string>
<string>example2</string>
<string>04561212123</string>
<string>example3</string>
<string>+1 156151561</string>
<string>example4</string>
<string>564513212</string>
<string>example3, </string>
<string>example4 </string>
How can I convert this into a CSV format without the repeated content using python? Here's an example output
FullName PhoneNumber
example1 014584111
example2 014584111
example3 +1 156151561
example4 564513212