Perl or Python script to convert an XML table to another XML table with specific format. [see attachment input.dita and output.dita files]

Job ID: 34230861

Budget: ₹600 – ₹1,500 INR

Contents of input vs output:
- tbody becomes dl
- row becomes dlentry
#- id within dlentry is combination of 1st entry [Term 1 = Term_1_TERM]
- 1st entry becomes dt
- 2nd entry becomes dd
Related categories: Perl XML Python