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 - will have a Node::Text(“”) as its children, while won’t.

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: booltrim_text: boolrequire_decl: boolencoding: Option<String>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.