XMLWriter.writeText

This writes the text that goes between start tags and end tags.

It can be called multiple times in a row, and the given text will just end up being appended to the current text field.

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

  1. void writeText(R text, Newline newline, InsertIndent insertIndent)
    struct XMLWriter(OR)
    void
    writeText
    (
    R
    )
    if (
    isForwardRange!R &&
    isSomeChar!(ElementType!R)
    )
    if (
    isOutputRange!(OR, char)
    )
  2. void writeText(R text, InsertIndent insertIndent, Newline newline)

Parameters

text R

The text to write.

newline Newline

Whether a _newline followed by an indent will be written to the output range before the text. It will not include an indent if insertIndent == InsertIndent.no.

insertIndent InsertIndent

Whether an indent will be inserted after each _newline within the _text.

Throws

XMLWritingException if any characters or sequence of characters in the given _text are not legal in the _text portion of an XML document. dxml.util.encodeText can be used to encode any characters that are not legal in their literal form but are legal as entity references.

See Also

Meta