XMLWriter.writeStartTag

Writes a start tag with no attributes.

This is equivalent to calling openStartTag immediately followed by closeStartTag.

It is an error to call writeStartTag after the end tag for the root element has been written.

  1. void writeStartTag(string name, EmptyTag emptyTag = EmptyTag.no, Newline newline = Newline.yes)
  2. void writeStartTag(string name, Newline newline, EmptyTag emptyTag = EmptyTag.no)
    struct XMLWriter(OR)
    void
    writeStartTag
    if (
    isOutputRange!(OR, char)
    )

Parameters

name
Type: string

The name of the start tag.

emptyTag
Type: EmptyTag

Whether the start tag will be empty (i.e. terminated with "/>" so that there is no corresponding end tag).

newline
Type: Newline

Whether a _newline followed by an indent will be written to the output range before the start tag.

Throws

XMLWritingException if the given _name is not a valid XML tag _name.

See Also

Meta