Skip to main content

Module node

Module node 

Source
Expand description

Node structures for XML tree representation.

This module provides the core node types used to represent XML documents as trees. The design mirrors the Java implementation with BaseNode and BranchNode, unified into a single NodeInner with different NodeKinds.

Re-exports§

pub use base::BaseNode;
pub use branch::BranchNode;
pub use namespace::is_xmlns_attr;
pub use namespace::split_qname;
pub use namespace::ExpandedName;
pub use namespace::NamespaceContext;

Modules§

base
Base node helper functions.
branch
Branch node helper functions.
namespace
Namespace handling for XML elements.

Structs§

MatchArea
Tags nodes in the same matched subtree.
MatchType
Match type flags indicating how a branch node matches its base node.
MatchedNodes
Container for a set of branch nodes matched to a base node.
NodeInner
The inner data of a node in the parse tree.
XmlComment
XML comment content.
XmlElement
An XML element with a qualified name and attributes.
XmlProcessingInstruction
XML processing instruction content.
XmlText
XML text content.

Enums§

NodeKind
Kind-specific data for nodes.
XmlContent
Represents the content of an XML node.

Functions§

java_string_hash
Computes a hash code compatible with Java’s String.hashCode().
new_base_node
Creates a new base node wrapped in NodeRef with properly initialized owner refs.
new_branch_node
Creates a new branch node wrapped in NodeRef.
new_node_ref
Creates a new node reference.

Type Aliases§

NodeRef
A reference-counted pointer to a node.
WeakNodeRef
A weak reference to a node, used to avoid reference cycles.