Struct xml_doc::ReadOptions [−][src]
pub struct ReadOptions {
pub empty_text_node: bool,
pub trim_text: bool,
pub require_decl: bool,
pub encoding: Option<String>,
}
Expand description
Options when parsing xml.
empty_text_node
: true -
trim_text
: true - trims leading and ending whitespaces in Node::Text.
require_decl
: true - Returns error if document doesn’t start with XML declaration.
If this is set to false, the parser won’t be able to decode encodings other than UTF-8, unless encoding
below is set.
encoding
: None - If this is set, the parser will start reading with this encoding.
But it will switch to XML declaration’s encoding value if it has a different value.
See encoding_rs::Encoding::for_label
for valid values.
Fields
empty_text_node: bool
trim_text: bool
require_decl: bool
encoding: Option<String>
Implementations
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ReadOptions
impl Send for ReadOptions
impl Sync for ReadOptions
impl Unpin for ReadOptions
impl UnwindSafe for ReadOptions
Blanket Implementations
Mutably borrows from an owned value. Read more