[−][src]Struct arquery::Document
The DOM tree representation of the parsed document.
Methods
impl Document
[src]
pub fn new_from_xml_stream<R: Read>(
stream: R
) -> Result<Document, DocumentError>
[src]
stream: R
) -> Result<Document, DocumentError>
Creates a new document from a byte stream.
pub fn new_from_xml_string(string: &str) -> Result<Document, DocumentError>
[src]
Creates a new document from a string.
pub fn new_from_xml_file(filename: &str) -> Result<Document, DocumentError>
[src]
Creates a new document from a file.
pub fn number_of_elements(&self) -> usize
[src]
Returns the total number of elements in the document.
pub fn select_all<'a>(
&'a self,
selector: &str
) -> Result<Box<dyn Iterator<Item = &'a Element> + 'a>, SelectError>
[src]
&'a self,
selector: &str
) -> Result<Box<dyn Iterator<Item = &'a Element> + 'a>, SelectError>
Searches the document for elements matching the given CSS selector.
pub fn select<'a>(&'a self, selector: &str) -> Result<&'a Element, SelectError>
[src]
Just like select_all
but only returns the first match.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,