XMLWriter.output

Provides access to the output range that's used by XMLWriter.

Note that any is data written to the output range without using XMLWriter could result in invalid XML.

This property is here primarily to provide easy access to the output range when XMLWriter is done writing (e.g. to get at its data member if it's a $(PHOBOS_REF Appender, std, array)), but programs can use it to write other data (such as whitespace other than the indent) to the output range while XMLWriter is still writing so long as it's understood that unlike when the XMLWriter's write functions are called, calling put on the output range directly is unchecked and therefore does risk making the XML invalid.

Also, depending on the type of the output range, copying it will cause problems (e.g. if it's not a reference type, writing to a copy may not write to the output range inside of XMLWriter), So in general, if the output range is going to be written to, it should be written to by using output directly rather than assigning it to a variable.

struct XMLWriter(OR)
@property ref @safe pure nothrow @nogc
output
()
if (
isOutputRange!(OR, char)
)

Meta