spring-framework / org.springframework.http.codec.xml / XmlEventDecoder

XmlEventDecoder

open class XmlEventDecoder : AbstractDecoder<XMLEvent>

Decodes a DataBuffer stream into a stream of XMLEvents. That is, given the following XML:

<root> <child>foo</child> <child>bar</child> </root> 
this method with result in a flux with the following events:
  1. javax.xml.stream.events.StartDocument
  2. javax.xml.stream.events.StartElement root
  3. javax.xml.stream.events.StartElement child
  4. javax.xml.stream.events.Characters foo
  5. javax.xml.stream.events.EndElement child
  6. javax.xml.stream.events.StartElement child
  7. javax.xml.stream.events.Characters bar
  8. javax.xml.stream.events.EndElement child
  9. javax.xml.stream.events.EndElement root
Note that this decoder is not registered by default but used internally by other decoders who are there by default.

Author
Arjen Poutsma

Since
5.0

Constructors

<init>

XmlEventDecoder()

Functions

decode

open fun decode(inputStream: Publisher<DataBuffer>, elementType: ResolvableType, mimeType: MimeType, hints: MutableMap<String, Any>): Flux<XMLEvent>