std1.0.0-beta-7 SafeC docs

std :: serial::xml

Struct std::Xml

#include <std/serial/xml.h> source

struct Xml {
    const &char root;
}

The XML backend as a Format (see value.h): v.encode(Xml::new("doc")), Value::decode(Xml::new("doc"), text, &ok). write emits one element named root; parse returns the root element's content (as xml_parse).

Fields

§const &char rootsource

the root element's tag; must outlive the Xml

Methods

§static struct Xml new(const &char root_tag)source · definition
§void write(const &Value v, &String out) constsource · definition
§struct Value parse(const &char text, ?&int ok) constsource · definition