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%
Transform a collection of article-like records into an XML document while preserving raw text content using CDATA sections. Each record becomes a child of the root element, and each key in the record becomes a child element name.
<![CDATA[...]]> so characters like < and & are not escaped. @test@generates
from typing import Iterable, Mapping, Union
def build_feed(entries: Iterable[Mapping[str, Union[str, int, float]]], root_name: str = "feed") -> bytes:
"""Convert entries to an XML document with CDATA-wrapped string content."""Serializes Python data structures to XML and can wrap values in CDATA sections.