aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/xml.py
blob: 7a0086d320d017d04941c6687ed3813d6e39f6e8 (plain)
1
2
3
4
5
6
7

import xml.etree.ElementTree as ET


def xml_reserialize(raw: bytes) -> str:
    root = ET.fromstring(raw)
    return '<?xml version="1.0" encoding="UTF-8"?>\n' + ET.tostring(root, encoding="unicode")