XmlEventDecoder class

A converter that decodes a String stream or chunk to a sequence of XmlEvent objects.

Throws an XmlParserException when encountering malformed XML syntax that cannot be parsed.

When validateDocument is false (default), arbitrary XML fragments or multiple root elements can be decoded. When true, input must follow standard XML document constraints (optional declaration, optional doctype, exactly one root element).

Inheritance

Constructors

XmlEventDecoder({XmlEntityMapping? entityMapping, bool validateDocument = false, bool validateNamespace = false, bool validateNesting = false, bool validateAttributes = false, bool withLocation = false, bool withNamespace = false, bool withParent = false})
Creates a new XmlEventDecoder.

Properties

entityMapping → XmlEntityMapping
The entity mapping used to decode text and attribute values.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
validateAttributes → bool
Whether duplicate attributes are rejected.
final
validateDocument → bool
Whether root document constraints are validated.
final
validateNamespace → bool
Whether namespace declarations and prefixes are validated.
final
validateNesting → bool
Whether element tag nesting is validated.
final
withLocation → bool
Whether events are annotated with start and stop offsets.
final
withNamespace → bool
Whether element and attribute namespace URIs are resolved.
final
withParent → bool
Whether events are annotated with their enclosing parent event.
final

Methods

bind(Stream<String> stream) → Stream<List<XmlEvent>>
Transforms the provided stream.
inherited
cast<RS, RT>() → Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(String input, [int start = 0, int? end]) → List<XmlEvent>
Converts input and returns the result of the conversion.
override
fuse<TT>(Converter<List<XmlEvent>, TT> other) → Converter<String, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<List<XmlEvent>> sink) → StringConversionSink
Starts a chunked conversion.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited