Package-level declarations

Types

Link copied to clipboard

Default implementation of a serialization policy that provides a behaviour that attempts to create an XML format that resembles what would be created manually in line with XML's design.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias NonRecoveryUnknownChildHandler = (input: XmlReader, inputKind: InputKind, name: QName?, candidates: Collection<Any>) -> Unit
Link copied to clipboard
Link copied to clipboard
data class PolyInfo(val tagName: QName, val index: Int, val descriptor: XmlDescriptor)

Helper class that collates information used in matching tags with types.

Link copied to clipboard
fun interface UnknownChildHandler
Link copied to clipboard
class UnknownXmlFieldException(locationInfo: String?, xmlName: String, candidates: Collection<Any> = emptyList()) : XmlSerialException
Link copied to clipboard
annotation class WillBePrivate
Link copied to clipboard
class XML(val config: XmlConfig, serializersModule: SerializersModule = EmptySerializersModule()) : StringFormat

Class that provides access to XML parsing and serialization for the Kotlin Serialization system. In most cases the companion functions would be used. Creating an object explicitly however allows for the serialization to be configured.

Link copied to clipboard
annotation class XmlAfter(val value: String)

Require this property to be serialized after other (sibling) properties. The names are the serialNames of the properties being serialized (not XML names).

Link copied to clipboard
annotation class XmlBefore(val value: String)

Require this property to be serialized before other (sibling) properties. The names are the serialNames of the properties being serialized (not XML names). Together XmlBefore and XmlAfter define a partial order over the properties.

Link copied to clipboard
annotation class XmlCData(val value: Boolean = true)

Mark the property for serialization as CData, rather than text (where appropriate). It also means that the value is not written as attribute.

Link copied to clipboard
annotation class XmlChildrenName(val value: String, val namespace: String = UNSET_ANNOTATION_VALUE, val prefix: String = UNSET_ANNOTATION_VALUE)

Specify additional information about child values. This is only used for primitives, not for classes that have their own independent name

Link copied to clipboard
class XmlConfig

Configuration for the xml parser.

Link copied to clipboard
annotation class XmlDefault(val value: String)

Allow a property to be omitted with a default serialized string

Link copied to clipboard
annotation class XmlElement(val value: Boolean = true)

Force a property that could be an attribute to be an element

Link copied to clipboard
annotation class XmlId

Annotation to mark the value as an ID attribute. This implies that the element is an attribute.

Link copied to clipboard
annotation class XmlIgnoreWhitespace(val value: Boolean = true)
Link copied to clipboard

Annotation allowing to specify namespaces specifications to be generated upon the element. As multiple annotations are not supported by the plugin this uses a single string. The string separates the namespaces using a semicolon (;). Each declaration is of the form ==. To specify the default namespace it is valid to omit the equals sign.

Link copied to clipboard
annotation class XmlOtherAttributes

Determine whether whitespace should be ignored or preserved for the tag.

Link copied to clipboard
class XmlParsingException(locationInfo: String?, message: String, cause: Exception? = null) : XmlSerialException
Link copied to clipboard
annotation class XmlPolyChildren(val value: Array<String>)

Indicate the valid poly children for this element

Link copied to clipboard
open class XmlSerialException(message: String, cause: Throwable? = null) : SerializationException
Link copied to clipboard
Link copied to clipboard
annotation class XmlSerialName(val value: String = UNSET_ANNOTATION_VALUE, val namespace: String = UNSET_ANNOTATION_VALUE, val prefix: String = UNSET_ANNOTATION_VALUE)

Specify more detailed name information than can be provided by kotlinx.serialization.SerialName.

Link copied to clipboard
annotation class XmlValue(val value: Boolean = true)

Force a property to be text element content

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun XmlSerialName.toQName(serialName: String, parentNamespace: Namespace?): QName
Link copied to clipboard