tessl install tessl/pypi-dicttoxml@1.7.0Converts a Python dictionary or other native data type into a valid XML string.
Agent Success
Agent success rate when using this tile
86%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.99x
Baseline
Agent success rate without this tile
87%
Produce an XML document from a list of product dictionaries, returning either bytes for transport or text for logging without manual encoding work.
catalog with one child element per product. @testas_text=True, the same input returns a Python string containing the XML, preserving characters like Cafe Latte without encoding errors. @testas_text=True matches the decoded content of the default byte output aside from the return type. @test@generates
from typing import List, Dict, Union
def build_catalog_xml(products: List[Dict], *, as_text: bool = False, root: str = "catalog") -> Union[bytes, str]:
...Provides XML serialization of Python objects.