xml_events library

Dart XML Events is an event based library to asynchronously parse XML documents and to convert them to other representations.

Classes

XmlByteStreamDecoder
A StreamTransformer that decodes a byte stream to a string stream, detecting and stripping Byte Order Marks (BOM) and sniffing XML encoding.
XmlCDATAEvent
Event of an XML CDATA node.
XmlCommentEvent
Event of an XML comment node.
XmlDeclarationEvent
Event of an XML declaration.
XmlDoctypeEvent
Event of an XML doctype node.
XmlDtdExternalId
Immutable DTD external identifier.
XmlEndElementEvent
Event of a closing XML element node.
XmlEvent
Immutable base class for all events.
XmlEventAttribute
Immutable attribute of an XML event.
XmlEventCodec
Converts between String and XmlEvent sequences.
XmlEventDecoder
A converter that decodes a String stream or chunk to a sequence of XmlEvent objects.
XmlEventEncoder
A converter that encodes a sequence of XmlEvent objects to a String.
XmlNodeCodec
Converts between XmlEvent sequences and XmlNode trees.
XmlNodeDecoder
A converter that decodes a sequence of XmlEvent objects to a forest of XmlNode objects.
XmlNodeEncoder
A converter that encodes a forest of XmlNode objects to a sequence of XmlEvent objects.
XmlNormalizeEvents
A converter that normalizes sequences of XmlEvent objects, namely combines adjacent and removes empty text events.
XmlProcessingEvent
Event of an XML processing node.
XmlStartElementEvent
Event of an XML start element node.
XmlSubtreeSelector
A converter that selects XmlEvent objects that are part of a sub-tree started by an XmlStartElementEvent satisfying the provided predicate.
XmlTextEvent
Event of an XML text node.
XmlWithParentEvents
A converter that annotates XmlEvent objects with their parent events.

Enums

XmlAttributeType
Enum of the attribute quote types.
XmlNodeType
Enum of the different XML node types.

Mixins

XmlEventVisitor
Basic visitor over XmlEvent nodes.

Extensions

XmlByteStreamDecoderExtension on Stream<List<int>>
Extension for byte stream decoding.
XmlEachEventStreamExtension on Stream<XmlEvent>
Extension to run callbacks on a stream of XmlEvent objects.
XmlEachEventStreamListExtension on Stream<List<XmlEvent>>
Extension to run callbacks on a stream of XmlEvent lists.
XmlEventDecoderExtension on Stream<String>
Extension to decode a stream of XML strings into XmlEvent lists.
XmlEventEncoderExtension on Stream<List<XmlEvent>>
Extension to encode a stream of XmlEvent lists into XML strings.
XmlFlattenStreamExtension on Stream<Iterable<T>>
Extension to flatten a stream of Iterable values.
XmlNodeDecoderExtension on Stream<List<XmlEvent>>
Extension to decode a stream of XmlEvent lists into XmlNode lists.
XmlNodeEncoderExtension on Stream<List<XmlNode>>
Extension to encode a stream of XmlNode lists into XmlEvent lists.
XmlNormalizeEventsExtension on Stream<List<XmlEvent>>
Extension to normalize a stream of XmlEvent lists.
XmlSubtreeSelectorExtension on Stream<List<XmlEvent>>
Extension to select matching XML subtrees from a stream of XmlEvent lists.
XmlWithParentEventsExtension on Stream<List<XmlEvent>>
Extension to annotate a stream of XmlEvent lists with parent references.

Functions

parseEvents(String input, {XmlEntityMapping? entityMapping, bool validateNesting = false, bool validateNamespace = false, bool validateDocument = false, bool validateAttributes = false, bool withBuffer = false, bool withLocation = false, bool withNamespace = false, bool withParent = false}) → Iterable<XmlEvent>
Returns an Iterable of XmlEvent instances over the provided input string.

Typedefs

DtdExternalId = XmlDtdExternalId
Deprecated alias for XmlDtdExternalId.