Struct xmltree::Element
[−]
[src]
pub struct Element { pub name: String, pub attributes: HashMap<String, String>, pub children: Vec<Element>, pub text: Option<String>, }
Represents an XML element.
Fields
name | The name of the Element. Does not include any namespace info |
attributes | The Element attributes |
children | Children |
text | The text data for this element |
Methods
impl Element
fn parse<R: Read>(r: R) -> Element
[−]
fn write<W: Write>(&self, w: W)
[−]
Writes out this element as the root element in an new XML document
fn get_child<K>(&self, k: K) -> Option<&Element> where String: PartialEq<K>
[−]
Attempts to find a child element with the given name
fn get_mut_child<'a, K>(&'a mut self, k: K) -> Option<&'a mut Element> where String: PartialEq<K>
[−]
Mutable version of the above API