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>),
}Expand description
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>)
Implementations§
Source§impl<'d> Node<'d>
impl<'d> Node<'d>
Sourcepub fn prefixed_name(&self) -> Option<String>
pub fn prefixed_name(&self) -> Option<String>
The name of the node, including a prefix that corresponds to the namespace, if any.
Sourcepub fn expanded_name(&self) -> Option<QName<'d>>
pub fn expanded_name(&self) -> Option<QName<'d>>
Returns the expanded name of the node, if any.
Sourcepub fn preceding_siblings(&self) -> Vec<Node<'d>>
pub fn preceding_siblings(&self) -> Vec<Node<'d>>
Returns the nodes with the same parent that occur before this node.
Sourcepub fn following_siblings(&self) -> Vec<Node<'d>>
pub fn following_siblings(&self) -> Vec<Node<'d>>
Returns the nodes with the same parent that occur after this node.
Sourcepub fn string_value(&self) -> String
pub fn string_value(&self) -> String
Returns the string value of this node.
pub fn root(self) -> Option<Root<'d>>
pub fn element(self) -> Option<Element<'d>>
pub fn attribute(self) -> Option<Attribute<'d>>
pub fn text(self) -> Option<Text<'d>>
pub fn comment(self) -> Option<Comment<'d>>
pub fn processing_instruction(self) -> Option<ProcessingInstruction<'d>>
pub fn namespace(self) -> Option<Namespace<'d>>
Trait Implementations§
Source§impl<'d> Extend<Node<'d>> for Nodeset<'d>
impl<'d> Extend<Node<'d>> for Nodeset<'d>
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Node<'d>>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Node<'d>>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'d> From<ProcessingInstruction<'d>> for Node<'d>
impl<'d> From<ProcessingInstruction<'d>> for Node<'d>
Source§fn from(v: ProcessingInstruction<'d>) -> Node<'d>
fn from(v: ProcessingInstruction<'d>) -> Node<'d>
Converts to this type from the input type.
Source§impl<'d> FromIterator<Node<'d>> for Nodeset<'d>
impl<'d> FromIterator<Node<'d>> for Nodeset<'d>
Source§impl<'d> FromIterator<Node<'d>> for OrderedNodes<'d>
impl<'d> FromIterator<Node<'d>> for OrderedNodes<'d>
Source§fn from_iter<I>(iterator: I) -> OrderedNodes<'d>where
I: IntoIterator<Item = Node<'d>>,
fn from_iter<I>(iterator: I) -> OrderedNodes<'d>where
I: IntoIterator<Item = Node<'d>>,
Creates a value from an iterator. Read more
Source§impl<'d> Into<Node<'d>> for ChildOfElement<'d>
impl<'d> Into<Node<'d>> for ChildOfElement<'d>
Source§impl<'d> Into<Node<'d>> for ChildOfRoot<'d>
impl<'d> Into<Node<'d>> for ChildOfRoot<'d>
Source§impl<'d> Into<Node<'d>> for ParentOfChild<'d>
impl<'d> Into<Node<'d>> for ParentOfChild<'d>
impl<'d> Copy for Node<'d>
impl<'d> Eq for Node<'d>
impl<'d> StructuralPartialEq for Node<'d>
Auto Trait Implementations§
impl<'d> Freeze for Node<'d>
impl<'d> !RefUnwindSafe for Node<'d>
impl<'d> !Send for Node<'d>
impl<'d> !Sync for Node<'d>
impl<'d> Unpin for Node<'d>
impl<'d> !UnwindSafe for Node<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more