Module reader

Source
Expand description

Contains high-level interface for a pull-based XML parser.

Modulesยง

buffered_reader ๐Ÿ”’
This is an implementation of Reader for reading from a BufRead as underlying byte stream.
ns_reader ๐Ÿ”’
A reader that manages namespace declarations found in the input and able to resolve qualified names to expanded names.
slice_reader ๐Ÿ”’
This is an implementation of Reader for reading from a &[u8] as underlying byte stream. This implementation supports not using an intermediate buffer as the byte slice itself can be used to borrow from.
state ๐Ÿ”’

Macrosยง

read_event_impl ๐Ÿ”’
read_to_end ๐Ÿ”’
Generalization of read_to_end method for buffered and borrowed readers
read_until_close ๐Ÿ”’
Read bytes up to the > and skip it. This method is expected to be called after seeing the < symbol and skipping it. Inspects the next (current) symbol and returns an appropriate Event:

Structsยง

BinaryStream
A direct stream to the underlying Readers reader which updates Reader::buffer_position() when read from it.
Config
A struct that holds a parser configuration.
NsReader
A low level encoding-agnostic XML event reader that performs namespace resolution.
Reader
A low level encoding-agnostic XML event reader.

Enumsยง

BangType ๐Ÿ”’
Possible elements started with <!
ParseState ๐Ÿ”’
Possible reader states. The state transition diagram (true and false shows value of Config::expand_empty_elements option):
ReadTextResult ๐Ÿ”’
Result of an attempt to read XML textual data from the reader.

Traitsยง

XmlSource ๐Ÿ”’
Represents an input for a reader that can return borrowed data.

Type Aliasesยง

Span
Range of input in bytes, that corresponds to some piece of XML