0

I want to replace the closing <category/> to Passenger cars </category> with python. I just need to add "Passenger cars" between the category opening and closing xml tags

        categories=xml.getElementsByTagName('category')[0].toxml()
        if categories=='<category/>':
            categories=categories.replace('<category/>','<category>Passenger cars</category>')

0 Answers0