[][src]Struct xml_dom::level2::ext::options::ProcessingOptions

pub struct ProcessingOptions(_);

This type encapsulates a set of options that a client can set that affect the processing of nodes as they are added/removed from the DOM.

This type has a set of methods that turn on options, i.e. set_assume_ids, and retrieve the state of an option, i.e. has_assume_ids.

Example

use xml_dom::level2::*;
use xml_dom::level2::convert::*;
use xml_dom::level2::ext::*;
use xml_dom::level2::ext::dom_impl::get_implementation_ext;

let mut options = ProcessingOptions::new();
options.set_assume_ids();

let implementation = get_implementation_ext();
let mut document_node = implementation
    .create_document_with_options(
        Some("http://www.w3.org/1999/xhtml"),
        Some("html"),
        None,
        options)
    .unwrap();

Methods

impl ProcessingOptions[src]

pub fn new() -> Self[src]

Construct a new ProcessingOptions instance with all options off.

pub fn has_none(&self) -> bool[src]

Returns true if all options are false.

pub fn has_assume_ids(&self) -> bool[src]

Returns true if the document will automatically assume certain attributes will be treated as XML id values, else false.

pub fn has_parse_entities(&self) -> bool[src]

Returns true if the document will parse entities inside text nodes and create EntityReference nodes, else false.

pub fn has_add_namespaces(&self) -> bool[src]

Returns true if the document will automatically add namespace attributes to elements if qualified names are added that do not have current mappings., else false.

pub fn set_assume_ids(&mut self)[src]

TBD.

Note: if an attribute with the qualified name xml:id, and the namespace is set to the XML namespace http://www.w3.org/XML/1998/namespace then the value is known to be an ID.

See xml:id Version 1.0, §4 Processing xml:id Attributes for more details.

pub fn set_parse_entities(&mut self)[src]

TBD

pub fn set_add_namespaces(&mut self)[src]

TBD

Trait Implementations

impl Binary for ProcessingOptions[src]

impl BitAnd<ProcessingOptions> for ProcessingOptions[src]

type Output = Self

The resulting type after applying the & operator.

impl BitOr<ProcessingOptions> for ProcessingOptions[src]

type Output = Self

The resulting type after applying the | operator.

impl Clone for ProcessingOptions[src]

impl Debug for ProcessingOptions[src]

impl Default for ProcessingOptions[src]

impl Display for ProcessingOptions[src]

impl Eq for ProcessingOptions[src]

impl PartialEq<ProcessingOptions> for ProcessingOptions[src]

impl StructuralEq for ProcessingOptions[src]

impl StructuralPartialEq for ProcessingOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.