pub struct NodeSet<'a> { /* private fields */ }Expand description
A set of nodes from a roxmltree document.
Represents the exact XPath nodes included for canonicalization and transforms.
Attributes and namespace bindings are first-class XPath nodes even though roxmltree exposes them through their owner element. Materializing them here lets XPath filters independently include or remove those nodes as required by canonical XML document-subset processing.
Implementations§
Source§impl<'a> NodeSet<'a>
impl<'a> NodeSet<'a>
Sourcepub fn entire_document_without_comments(
doc: &'a Document<'a>,
) -> Result<Self, TransformError>
pub fn entire_document_without_comments( doc: &'a Document<'a>, ) -> Result<Self, TransformError>
Project the complete document with comment nodes omitted.
XMLDSig 1.1 section 4.4.3.3 excludes comments for an empty Reference URI. Returns a policy error when the projection allowance is exceeded.
Sourcepub fn entire_document_with_comments(
doc: &'a Document<'a>,
) -> Result<Self, TransformError>
pub fn entire_document_with_comments( doc: &'a Document<'a>, ) -> Result<Self, TransformError>
Project the complete document including comments.
Returns a policy error when the projection allowance is exceeded.
Sourcepub fn subtree(element: Node<'a, 'a>) -> Result<Self, TransformError>
pub fn subtree(element: Node<'a, 'a>) -> Result<Self, TransformError>
Project a subtree including its attribute, namespace and comment nodes.
Returns a policy error when the projection allowance is exceeded.
Sourcepub fn contains(&self, node: Node<'_, '_>) -> bool
pub fn contains(&self, node: Node<'_, '_>) -> bool
Test tree membership; a node from another document is never included.
Sourcepub fn exclude_subtree(&mut self, node: Node<'_, '_>)
pub fn exclude_subtree(&mut self, node: Node<'_, '_>)
Exclude a subtree and every projected axis owned by its nodes.
Sourcepub fn with_comments(&self) -> bool
pub fn with_comments(&self) -> bool
Whether this projection permits comment nodes.