Class XMLIndentingStreamWriter

A XMLIndentingStreamWriter writes the XML output formatted for good readability.

Note: when this class is used with sensitive data, be careful in persisting sensitive information to disk.

PropertyDescription
indent: StringReturns the indent.
newLine: StringReturns the string that is used for a new line character.
ConstructorDescription
XMLIndentingStreamWriter(Writer)Constructs the writer for the specified writer.
MethodDescription
getIndent()Returns the indent.
getNewLine()Returns the string that is used for a new line character.
setIndent(String)Specifies a string that will be used as identing characters.
setNewLine(String)Sets the string that is used for a new line character.

close, flush, getDefaultNamespace, getPrefix, setDefaultNamespace, setPrefix, writeAttribute, writeAttribute, writeAttribute, writeCData, writeCharacters, writeComment, writeDTD, writeDefaultNamespace, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEndElement, writeEntityRef, writeNamespace, writeProcessingInstruction, writeProcessingInstruction, writeRaw, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement, writeStartElement

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

indent: String

Returns the indent.


newLine: String

Returns the string that is used for a new line character. The default is the normal new line character.


XMLIndentingStreamWriter(writer: Writer)

Constructs the writer for the specified writer.

Parameters:

  • writer - the writer to use.

getIndent(): String

Returns the indent.

Returns:

  • Returns the indent.

getNewLine(): String

Returns the string that is used for a new line character. The default is the normal new line character.

Returns:

  • the new line.

setIndent(indent: String): void

Specifies a string that will be used as identing characters. The default are two space characters.

Parameters:

  • indent - The indent to set.

setNewLine(newLine: String): void

Sets the string that is used for a new line character.

Parameters:

  • newLine - The newLine to set.