Name of the element.
Unsanitized attributes to insert at compile-time.
Attributes (via Attribute and attr), children and text of the element.
a Element type, implictly castable to string.
enum xml = elemX!"xml"( elemX!"heading"("This is my sample document!"), elemX!("spacing /", q{ height="1em" }), elemX!"spacing /"(["height": "1em"]), elemX!"empty", elemX!"br", elemX!"container" .addX!"paragraph"("Foo") .addX!"paragraph"("Bar"), ); assert(xml == "<xml>" ~ ( "<heading>This is my sample document!</heading>" ~ `<spacing height="1em"/>` ~ `<spacing height="1em"/>` ~ `<empty></empty>` ~ `<br></br>` ~ "<container>" ~ ( "<paragraph>Foo</paragraph>" ~ "<paragraph>Bar</paragraph>" ) ~ "</container>" ) ~ "</xml>");
Create an XML element.