79461873

Date: 2025-02-23 19:54:35
Score: 1.5
Natty:
Report link

Your task seems to be best addressed by XSLT (eXtensible Style Sheet Language) which the main language for conversion of one XML into another (https://www.w3.org/TR/xslt-30/). If you stick to Python as your prefered programming environment, see How to transform an XML file using XSLT in Python? and be aware that you the standard python libraries process only XSLT 1.0. Your problem might involve regular expressions, which are only supported from XSLT 2.0 onwards. For this, the python port of Saxonica's saxon library is probably the best suited (https://pypi.org/project/saxonche/).

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: GVogeler