#include "demo_guard.h" RENDER(Request& context) { DTree book; book["name"] = "book"; book["attrs"]["id"] = "b1"; book["attrs"]["type"] = "reference"; DTree title; title["name"] = "title"; title["text"] = "UCE & XML"; book["children"].push(title); DTree chapter; chapter["name"] = "chapter"; chapter["attrs"]["number"] = "1"; chapter["text"] = "Structural conversion without schema validation."; book["children"].push(chapter); String encoded = xml_encode(book); DTree decoded = xml_decode(encoded); DTree simple; simple["title"] = "Hello"; simple["count"] = "3"; String incoming = "UCEAB"; DTree incoming_tree = xml_decode(incoming); <>

UCE Test: XML

xml_encode() and xml_decode() convert between XML strings and element-shaped DTree values without schema validation.

Encoded Element Tree

Decoded DTree

Simple Map Encoding

Decode Existing XML

Input XML:

Decoded DTree:

xml_encode() docs | xml_decode() docs

}