Constructors

Link copied to clipboard
constructor(repairNamespaces: Boolean = true, xmlDeclMode: XmlDeclMode = XmlDeclMode.None, indentString: String = "", policy: P)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Default parsing to the optimized generic parser rather than using the platform specific one

Link copied to clipboard

The indentation to use. This is passed to the XmlWriter. Note that at this point no validation of the indentation is done, if it is not valid whitespace it will produce unexpected XML.

Link copied to clipboard

Allow decoding xsi:nil (from the xml schema instance namespace) independent of the configured nil attribute (that will also be detected if present). This does not change engoding/serialization.

Link copied to clipboard

This property determines whether the serialization will collect all used namespaces and emits all namespace attributes on the root tag.

Link copied to clipboard

This property can be used to disable various checks on the correctness of the serializer descriptions. This should speed up processing, but may give surprising results in the presence of an error.

Link copied to clipboard

Configuration that specifies whether an attribute is used to indicate a null value (such as the xsi:nil attribute from xml schema). The value is a pair of the QName of the attribute and the string to indicate that the value is in fact null.

Link copied to clipboard
open override var policy: P
Link copied to clipboard

Should namespaces automatically be repaired. This option will be passed on to the XmlWriter

Link copied to clipboard

Should the generated XML contain an XML declaration or not. This is passed to the XmlWriter

Link copied to clipboard

The version of XML to write. Reading ignores this option and supports both (the standard would treat documents without explicit version as 1.0 - while the parser may nonetheless accept characters only valid in 1.1 in such documents).

Functions

Link copied to clipboard
fun setIndent(count: Int)

Set the indent as the count amount of spaces. Indentation does also involve newlines, if not 0.

Link copied to clipboard
fun useXsiNil()

Shortcut to set nilAttribute to serialize as XMLSchema Instance nil (xsi:nil) attribute.