This guide covers the essential operations for working with Kodexa Documents: creating, loading, manipulating, and saving documents.Documentation Index
Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Initialization
Creating Documents
Empty Document
Create a new document and build its structure:From Text
Automatically parse text into paragraphs:With Metadata
Initialize documents with metadata:Loading Documents
From KDDB File / Blob
From JSON
Working with Content Nodes
Navigation
Traverse the document tree:Content Access
Read and modify node content:Querying with Selectors
Use XPath-like selectors to find nodes:Common Selector Patterns
| Selector | Description |
|---|---|
//* | All nodes |
//paragraph | All paragraphs |
//section/paragraph | Direct child paragraphs of sections |
//paragraph[1] | First paragraph |
//*[@tag='important'] | Nodes with ‘important’ tag |
//paragraph[contains(@content, 'text')] | Paragraphs containing ‘text’ |
Adding Features
Attach metadata to nodes:Adding Tags
Annotate nodes with tags:Saving Documents
To KDDB File / Blob
To JSON
Memory Management
Complete Example
A full invoice processing workflow:Next Steps
As you become more familiar with the SDK, explore:- Advanced XPath selectors for complex queries
- Processing steps for workflow tracking
- Integration with Kodexa Platform for cloud processing
