The _output range that the XML will be written to.
Optional argument indicating the base indent to be used when an indent is inserted after a newline in the XML (with the actual indent being the base indent inserted once for each level of the tagDepth). The default is four spaces.
import std.array : Appender, appender; auto writer = new XMLWriter!(Appender!string)(appender!string()); writer.writeStartTag("root", Newline.no, EmptyTag.yes); assert(writer.output.data == "<root/>");
In general, it's more user-friendly to use xmlWriter rather than calling the constructor directly, because then the type of the output range can be inferred. However, in the case where a pointer is desirable, then the constructor needs to be called instead of xmlWriter.