How to read xml file in python and save it to a variable and then work on it?

Viewed 25

I have tried to save the xml file in the following variable and later work on it as normal xml file. This is not working. How can I approach this situation. I need to edit the xml file without editing in the original file and without creating a new xml file. Is that possible?

comment_2 = open("cool.xml").read()

Thanks and Regards

0 Answers
Related