pub struct Node { /* private fields */ }
Expand description
A high level tree representation of an XML DOM class.
Implementations§
Source§impl Node
impl Node
Sourcepub fn builder(name: &str) -> NodeBuilder<'_>
pub fn builder(name: &str) -> NodeBuilder<'_>
Gets a NodeBuilder
for a Node
with a specified name.
Sourcepub fn has_attribute(&self, key: &str) -> bool
pub fn has_attribute(&self, key: &str) -> bool
Checks if the Node
has an attribute with the given key.
Sourcepub fn has_childs(&self) -> bool
pub fn has_childs(&self) -> bool
Checks if the Node
has childs.
Sourcepub fn child_count(&self) -> usize
pub fn child_count(&self) -> usize
Gets the amount of childs the Node
has.
Sourcepub fn child_by_name<'a, 'n: 'a>(&'a self, name: &'n str) -> Result<&'a Self>
pub fn child_by_name<'a, 'n: 'a>(&'a self, name: &'n str) -> Result<&'a Self>
Sourcepub fn childs_by_name<'a, 'n: 'a>(
&'a self,
name: &'n str,
) -> impl Iterator<Item = &'a Self> + 'a
pub fn childs_by_name<'a, 'n: 'a>( &'a self, name: &'n str, ) -> impl Iterator<Item = &'a Self> + 'a
Returns an iterator with all childs that have the given name.
Trait Implementations§
Source§impl<'a> From<&'a Node> for BytesStart<'a>
impl<'a> From<&'a Node> for BytesStart<'a>
Source§impl<'a> From<NodeBuilder<'a>> for Node
impl<'a> From<NodeBuilder<'a>> for Node
Source§fn from(builder: NodeBuilder<'a>) -> Self
fn from(builder: NodeBuilder<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> TryFrom<&BytesStart<'a>> for Node
impl<'a> TryFrom<&BytesStart<'a>> for Node
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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