pub struct XmlDomDocument<'input> { /* private fields */ }Expand description
Parsed backend-neutral XML document.
The selected parser is used only while constructing this arena. C14N, XPath, XMLDSig, XMLEnc, and mutation code never branch on the parser.
Implementations§
Source§impl<'input> Document<'input>
impl<'input> Document<'input>
Sourcepub fn parse(input: &'input str) -> Result<Self, ParseError>
pub fn parse(input: &'input str) -> Result<Self, ParseError>
Parses XML with default backend-neutral options.
Sourcepub fn parse_with_options(
input: &'input str,
options: ParsingOptions,
) -> Result<Self, ParseError>
pub fn parse_with_options( input: &'input str, options: ParsingOptions, ) -> Result<Self, ParseError>
Parses XML with the build’s default backend.
Sourcepub fn parse_with_backend(
input: &'input str,
backend: XmlBackend,
) -> Result<Self, ParseError>
pub fn parse_with_backend( input: &'input str, backend: XmlBackend, ) -> Result<Self, ParseError>
Parses XML with an explicitly selected compiled backend.
Sourcepub fn parse_with_options_and_backend(
input: &'input str,
options: ParsingOptions,
backend: XmlBackend,
) -> Result<Self, ParseError>
pub fn parse_with_options_and_backend( input: &'input str, options: ParsingOptions, backend: XmlBackend, ) -> Result<Self, ParseError>
Parses XML with explicit parser options and backend selection.
Sourcepub fn input_text(&self) -> &'input str
pub fn input_text(&self) -> &'input str
Returns the original UTF-8 source.
Sourcepub fn root_element(&self) -> Node<'_, 'input>
pub fn root_element(&self) -> Node<'_, 'input>
Returns the document element.
Sourcepub fn descendants(&self) -> Descendants<'_, 'input> ⓘ
pub fn descendants(&self) -> Descendants<'_, 'input> ⓘ
Iterates the document root and all descendants in document order.
Trait Implementations§
Auto Trait Implementations§
impl<'input> Freeze for Document<'input>
impl<'input> RefUnwindSafe for Document<'input>
impl<'input> Send for Document<'input>
impl<'input> Sync for Document<'input>
impl<'input> Unpin for Document<'input>
impl<'input> UnsafeUnpin for Document<'input>
impl<'input> UnwindSafe for Document<'input>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more