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]

[src]

Create a new empty element with given name

All other fields are empty

[src]

Parses some data into an Element

[src]

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

[src]

Writes out this element as the root element in a new XML document using the provided configuration

[src]

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

[src]

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

[src]

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

Trait Implementations

impl Debug for Element
[src]

[src]

Formats the value using the given formatter.

impl Clone for Element
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Element
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Element
[src]