Struct elementtree::Element
[−]
[src]
pub struct Element { /* fields omitted */ }
Represents an XML element.
Methods
impl Element
[src]
fn from_reader<R: Read>(r: R) -> Result<Element, ParseError>
Parses some data into an Element
fn text(&self) -> &str
Returns the text of a tag
fn tail(&self) -> &str
Returns the tail text of a tag
fn tag(&self) -> &QName
The tag of the element as qualified name
fn child_count(&self) -> usize
Returns the number of children
fn get_child(&self, idx: usize) -> Option<&Element>
Returns the nth child.
fn children<'a>(&'a self) -> Children<'a>
Returns an iterator over all children.
fn find_all<'a, Q: AsQName<'a>>(&'a self, tag: Q) -> FindChildren<'a>
Returns all children with the given name.
fn find<'a, Q: AsQName<'a>>(&'a self, tag: Q) -> Option<&'a Element>
Finds the first matching child
fn get_attr<'a, Q: AsQName<'a>>(&'a self, name: Q) -> Option<&'a str>
Look up an attribute by qualified name.
fn attrs<'a>(&'a self) -> Attrs<'a>
Returns an iterator over all attributes
fn attr_count(&self) -> usize
Count the attributes
Finds the first element that match a given path downwards
Trait Implementations
impl Debug for Element
[src]
impl Clone for Element
[src]
fn clone(&self) -> Element
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more