Struct sxd_document::dom::Element
[−]
[src]
pub struct Element<'d> { /* fields omitted */ }Elements are the workhorse of a document and may contain any type of node, except for the Root node
Methods
impl<'d> Element<'d>[src]
impl<'d> Element<'d>[src]
fn name(&self) -> QName<'d>
fn set_name<'n, N>(&self, name: N) where
N: Into<QName<'n>>,
N: Into<QName<'n>>,
fn set_default_namespace_uri(&self, namespace_uri: Option<&str>)
fn default_namespace_uri(&self) -> Option<&'d str>
fn recursive_default_namespace_uri(&self) -> Option<&'d str>
fn register_prefix(&self, prefix: &str, namespace_uri: &str)
Map a prefix to a namespace URI. Any existing prefix on this element will be replaced.
fn namespace_uri_for_prefix(&self, prefix: &str) -> Option<&'d str>
Recursively resolve the prefix to a namespace URI.
fn prefix_for_namespace_uri(
&self,
namespace_uri: &str,
preferred: Option<&str>
) -> Option<&'d str>
&self,
namespace_uri: &str,
preferred: Option<&str>
) -> Option<&'d str>
Recursively find a prefix for the namespace URI. Since
multiple prefixes may map to the same URI, preferred can be
provided to select a specific prefix, if it is valid.
fn namespaces_in_scope(&self) -> Vec<Namespace<'d>>
Retrieve all namespaces that are in scope, recursively walking up the document tree.
fn preferred_prefix(&self) -> Option<&'d str>
fn set_preferred_prefix(&self, prefix: Option<&str>)
fn parent(&self) -> Option<ParentOfChild<'d>>
fn append_child<C>(&self, child: C) where
C: Into<ChildOfElement<'d>>,
C: Into<ChildOfElement<'d>>,
fn children(&self) -> Vec<ChildOfElement<'d>>
fn preceding_siblings(&self) -> Vec<ChildOfElement<'d>>
fn following_siblings(&self) -> Vec<ChildOfElement<'d>>
fn attribute<'n, N>(&self, name: N) -> Option<Attribute<'d>> where
N: Into<QName<'n>>,
N: Into<QName<'n>>,
fn attributes(&self) -> Vec<Attribute<'d>>
fn set_attribute_value<'n, N>(&self, name: N, value: &str) -> Attribute<'d> where
N: Into<QName<'n>>,
N: Into<QName<'n>>,
fn attribute_value<'n, N>(&self, name: N) -> Option<&'d str> where
N: Into<QName<'n>>,
N: Into<QName<'n>>,
Trait Implementations
impl<'d> Copy for Element<'d>[src]
impl<'d> Clone for Element<'d>[src]
fn clone(&self) -> Element<'d>
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
impl<'d> PartialEq for Element<'d>[src]
fn eq(&self, other: &Element<'d>) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl<'d> Eq for Element<'d>[src]
impl<'d> Hash for Element<'d>[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more