pub struct Node { /* private fields */ }Expand description
A node: a document and the position of the node in it.
Two Node values are equal when they are the same node (XPath is).
Implementations§
Source§impl Node
impl Node
Sourcepub fn name(&self) -> Option<&QName>
pub fn name(&self) -> Option<&QName>
The name of an element or attribute, with the prefix it was written with, or the
target of a processing instruction (as a local name); None for other nodes.
Sourcepub fn string_value(&self) -> Cow<'_, str>
pub fn string_value(&self) -> Cow<'_, str>
The string value (XDM dm:string-value).
Sourcepub fn typed_value(&self) -> AtomicValue
pub fn typed_value(&self) -> AtomicValue
The typed value of the node in an untyped tree: xs:untypedAtomic, except for
comments and processing instructions, whose typed value is an xs:string.
Sourcepub fn axis(&self, axis: NodeAxis) -> Axis ⓘ
pub fn axis(&self, axis: NodeAxis) -> Axis ⓘ
The nodes on an axis from this node, in axis order (reverse document order for the reverse axes).
Sourcepub fn attributes(&self) -> Axis ⓘ
pub fn attributes(&self) -> Axis ⓘ
The attributes, in document order (the order of the source).
Sourcepub fn cmp_document_order(&self, other: &Self) -> Ordering
pub fn cmp_document_order(&self, other: &Self) -> Ordering
Document order. Nodes of different documents are ordered by the creation of their documents.
Trait Implementations§
impl Eq for Node
Auto Trait Implementations§
impl !Send for Node
impl !Sync for Node
impl Forget for Node
impl Freeze for Node
impl RefUnwindSafe for Node
impl Unpin for Node
impl UnsafeUnpin 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