Struct xmltree::Element [] [src]

pub struct Element {
    pub prefix: Option<String>,
    pub namespace: Option<String>,
    pub namespaces: Option<Namespace>,
    pub name: String,
    pub attributes: HashMap<String, String>,
    pub children: Vec<Element>,
    pub text: Option<String>,
}

Represents an XML element.

Fields

This elements prefix, if any

This elements namespace, if any

The full list of namespaces, if any

The Namespace type is exported from the xml-rs crate.

The name of the Element. Does not include any namespace info

The Element attributes

Children

The text data for this element

Methods

impl Element
[src]

Create a new empty element with given name

All other fields are empty

Parses some data into an Element

Writes out this element as the root element in an new XML document

Find a child element with the given name and return a reference to it.

Find a child element with the given name and return a mutable reference to it.

Find a child element with the given name, remove and return it.

Trait Implementations

impl Debug for Element
[src]

Formats the value using the given formatter.

impl Clone for Element
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Element
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Element
[src]