aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler/xml.py
blob: 83d53d4597775db6141cb46e3efbe3bb5a129392 (plain)
1
2
3
4
5
6
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")