Struct xml5ever::driver::XmlParser [−][src]
pub struct XmlParser<Sink> where
Sink: TreeSink, {
pub tokenizer: XmlTokenizer<XmlTreeBuilder<Sink::Handle, Sink>>,
pub input_buffer: BufferQueue,
}
Expand description
An XML parser,
ready to receive Unicode input through the tendril::TendrilSink
trait’s methods.
Fields
tokenizer: XmlTokenizer<XmlTreeBuilder<Sink::Handle, Sink>>
Tokenizer used by XmlParser.
input_buffer: BufferQueue
Input used by XmlParser.
Implementations
Wrap this parser into a TendrilSink
that accepts UTF-8 bytes.
Use this when your input is bytes that are known to be in the UTF-8 encoding.
Decoding is lossy, like String::from_utf8_lossy
.
Trait Implementations
Process this tendril.
fn from_iter<I>(self, i: I) -> Self::Output where
I: IntoIterator,
<I as IntoIterator>::Item: Into<Tendril<F, A>>,
fn from_iter<I>(self, i: I) -> Self::Output where
I: IntoIterator,
<I as IntoIterator>::Item: Into<Tendril<F, A>>,
Consume an iterator of tendrils, processing each item, then finish.
Read from the given stream of bytes until exhaustion and process incrementally,
then finish. Return Err
at the first I/O error. Read more