Enum sxd_xpath::nodeset::Node
[−]
[src]
pub enum Node<'d> { Root(Root<'d>), Element(Element<'d>), Attribute(Attribute<'d>), Text(Text<'d>), Comment(Comment<'d>), Namespace(Namespace<'d>), ProcessingInstruction(ProcessingInstruction<'d>), }
Any of the various types of nodes found in an XML document.
Variants
Root(Root<'d>)
Element(Element<'d>)
Attribute(Attribute<'d>)
Text(Text<'d>)
Comment(Comment<'d>)
Namespace(Namespace<'d>)
ProcessingInstruction(ProcessingInstruction<'d>)
Methods
impl<'d> Node<'d>
[src]
fn document(&self) -> Document<'d>
The document to which this node belongs.
fn prefixed_name(&self) -> Option<String>
The name of the node, including a prefix that corresponds to the namespace, if any.
fn expanded_name(&self) -> Option<QName<'d>>
Returns the expanded name of the node, if any.
fn parent(&self) -> Option<Node<'d>>
Returns the parent of the node, if any.
fn children(&self) -> Vec<Node<'d>>
Returns the children of the node, if any.
fn preceding_siblings(&self) -> Vec<Node<'d>>
Returns the nodes with the same parent that occur before this node.
fn following_siblings(&self) -> Vec<Node<'d>>
Returns the nodes with the same parent that occur after this node.
fn string_value(&self) -> String
Returns the string value of this node.
fn root(self) -> Option<Root<'d>>
fn element(self) -> Option<Element<'d>>
fn attribute(self) -> Option<Attribute<'d>>
fn text(self) -> Option<Text<'d>>
fn comment(self) -> Option<Comment<'d>>
fn processing_instruction(self) -> Option<ProcessingInstruction<'d>>
fn namespace(self) -> Option<Namespace<'d>>
Trait Implementations
impl<'d> Debug for Node<'d>
[src]
impl<'d> Copy for Node<'d>
[src]
impl<'d> Clone for Node<'d>
[src]
fn clone(&self) -> Node<'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 Node<'d>
[src]
fn eq(&self, __arg_0: &Node<'d>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Node<'d>) -> bool
This method tests for !=
.
impl<'d> Eq for Node<'d>
[src]
impl<'d> Hash for Node<'d>
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
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
impl<'d> From<Root<'d>> for Node<'d>
[src]
impl<'d> From<Element<'d>> for Node<'d>
[src]
impl<'d> From<Attribute<'d>> for Node<'d>
[src]
impl<'d> From<Text<'d>> for Node<'d>
[src]
impl<'d> From<Comment<'d>> for Node<'d>
[src]
impl<'d> From<ProcessingInstruction<'d>> for Node<'d>
[src]
fn from(v: ProcessingInstruction<'d>) -> Node<'d>
Performs the conversion.