decodeFromSource

inline fun <T> XML.XmlCompanion.decodeFromSource(source: Source, rootName: QName? = null): T
inline fun <T> XML.decodeFromSource(source: Source, rootName: QName? = null): T

Parse an object of the type T out of the reader. This function is intended mostly to be used indirectly where though the reified function.

Parameters

source

An XmlReader that contains the XML from which to read the object

rootName

The QName to use for the root tag, if null it will be automatically detected.


fun <T> XML.XmlCompanion.decodeFromSource(serializer: DeserializationStrategy<T>, source: Source, rootName: QName? = null): T
fun <T> XML.decodeFromSource(serializer: DeserializationStrategy<T>, source: Source, rootName: QName? = null): T

Parse an object of the type T out of the reader. This function is intended mostly to be used indirectly where though the reified function.

Parameters

source

An XmlReader that contains the XML from which to read the object

rootName

The QName to use for the root tag, if null it will be automatically detected.

serializer

The loader to use to read the object