Skip to main content
Content nodes form the hierarchical structure of a Kodexa document. Each node represents a piece of content (text, a section, a page, etc.) and can have children, features, and tags.

Node Basics

Creating Nodes

Node Types

Common node types used in Kodexa documents:

Node Content

Reading and Writing Content

Content Parts

Nodes can have multiple content parts for complex text:

Aggregated Content

Get all content from a node and its descendants:

Tree Navigation

Parent and Children

Siblings

Depth and Position

Node Features

Features are typed key-value metadata attached to individual nodes:

Node Tags

Tags annotate nodes with labels, optional confidence scores, and values:
remove_tag is idempotent: if the node doesn’t carry the named tag, it’s a no-op and returns quietly rather than raising an error. When the tag is present, every instance of that tag name on the node is removed.

Spatial Data (Bounding Boxes)

Nodes can have spatial information for document layout:

Building Document Structures

Invoice Example