Struct rquery::Document
[−]
[src]
pub struct Document { /* fields omitted */ }
The DOM tree representation of the parsed document.
Methods
impl Document
[src]
fn new_from_xml_stream<R: Read>(stream: R) -> Result<Document, DocumentError>
[src]
Creates a new document from a byte stream.
fn new_from_xml_string(string: &str) -> Result<Document, DocumentError>
[src]
Creates a new document from a string.
fn new_from_xml_file(filename: &str) -> Result<Document, DocumentError>
[src]
Creates a new document from a file.
fn number_of_elements(&self) -> usize
[src]
Returns the total number of elements in the document.
fn select_all<'a>(
&'a self,
selector: &str
) -> Result<Box<Iterator<Item = &'a Element> + 'a>, SelectError>
[src]
&'a self,
selector: &str
) -> Result<Box<Iterator<Item = &'a Element> + 'a>, SelectError>
Searches the document for elements matching the given CSS selector.
fn select<'a>(&'a self, selector: &str) -> Result<&'a Element, SelectError>
[src]
Just like select_all
but only returns the first match.
Trait Implementations
impl Clone for Document
[src]
fn clone(&self) -> Document
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more