I need to replace all the text in a xml using Beautifulsoup library in Python. For example, i have this peace of xml:
<Paragraph>
Procedure general informations
<IntLink Target="il_0_mob_411" Type="MediaObject"/>
<Strong>DIFFICULTY: </Strong>
<IntLink Target="il_0_mob_231" Type="MediaObject"/>
<IntLink Target="il_0_mob_231" Type="MediaObject"/> -
<Strong>DURATION:</Strong> 15 min.<br/>
<Strong>TOOLS REQUIRED:</Strong> 4mm Allen Key, Pin driver
</Paragraph>
And i need it going to beacome like this:
<Paragraph>
0
<IntLink Target="il_0_mob_411" Type="MediaObject"/>
<Strong>1</Strong>
<IntLink Target="il_0_mob_231" Type="MediaObject"/>
<IntLink Target="il_0_mob_231" Type="MediaObject"/> -
<Strong>2</Strong>3<br/>
<Strong>4</Strong>5
</Paragraph>
Thank you!
Here's the code: