def METHOD_NAME(self, xml: str) -> None:
    try:
        it = ET.iterparse(StringIO(xml))
        for _, el in it:
            _, _, el.tag = el.tag.rpartition("}")
        root: ET.Element = it.root  # type: ignore
    except Exception as e:
        raise ET.ParseError(f"Could not parse XML. {e}")
    def parse_tileset(element: ET.Element) -> TileSet:
        href = find_attr(element, "href")
        units_per_pixel = float(find_attr(element, "units-per-pixel"))
        order = int(find_attr(element, "order"))
        zoom_level = int(href.rsplit("/", maxsplit=1)[-1])
        return TileSet(href=href, units_per_pixel=units_per_pixel, order=order, zoom_level=zoom_level)
    def parse_tileformat(element: ET.Element) -> TileFormat:
        width = int(find_attr(element, "width"))
        height = int(find_attr(element, "height"))
        mime_type = find_attr(element, "mime-type")
        extension = find_attr(element, "extension")
        return TileFormat(width=width, height=height, mime_type=mime_type, extension=extension)
    if root.tag == "TileMap":
        tilemap_element = root
    else:
        tilemap_element = root.find("./TileMap")
    if tilemap_element is not None:
        title = find_text(tilemap_element, "Title")
        abstract = find_text_optional(tilemap_element, "Abstract")
        crs = find_text(tilemap_element, "SRS").upper()
        # Normalize EPSG:3785 alias to EPSG:3785
        if crs in epsg_3857_alias:
            crs = "EPSG:3785"
        tileformat_element = tilemap_element.find("TileFormat")
        if tileformat_element is None:
            raise RuntimeError("No TileFormat found.")
        tile_format = parse_tileformat(tileformat_element)
        bbox = None
        bbox84 = None
        boundingbox_element = tilemap_element.find("BoundingBox")
        if boundingbox_element is not None:
            bbox = BoundingBox(
                west=float(find_attr(boundingbox_element, "minx")),
                east=float(find_attr(boundingbox_element, "maxx")),
                south=float(find_attr(boundingbox_element, "minx")),
                north=float(find_attr(boundingbox_element, "maxy")),
            )
            # Calc bounding box in EPSG:4326
            if crs == "EPSG:4326":
                bbox84 = bbox
            elif crs in valid_epsgs:
                crs_from = CRS.from_string(crs)
                crs_to = CRS.from_string("EPSG:4326")
                transformer = get_transformer(crs_from, crs_to)
                tl = transformer.transform(bbox.west, bbox.north)
                br = transformer.transform(bbox.east, bbox.south)
                bbox84 = BoundingBox(west=tl[0], east=br[0], south=br[1], north=tl[1])
        tilesets = [parse_tileset(tileset_element) for tileset_element in tilemap_element.findall(".//TileSet")]
        tilemap = TileMap(
            title=title,
            abstract=abstract,
            crs=crs,
            bbox=bbox,
            bbox84=bbox84,
            tile_format=tile_format,
            tilesets=tilesets,
        )
        self.tile_map = tilemap