Packages

Lightning-fast XML parsing and XPath querying for Elixir, powered by Rust NIFs

Current section

Files

Jump to
expath CHANGELOG.md
Raw

CHANGELOG.md

# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.2.0] - 2025-08-28
### Added
- XML namespace support with `select/3` and `query/3` functions
- Namespace-aware XPath queries with custom namespace mappings
- Built-in support for `xml:` namespace (always available)
- Comprehensive namespace validation to prevent runtime panics
- Enhanced error handling for unregistered namespace prefixes
### Fixed
- **Critical**: Eliminated runtime panics when using unregistered namespace prefixes
- Now returns `{:error, :invalid_xpath}` instead of crashing for invalid namespaces
- Automatic registration of built-in XML namespace (`http://www.w3.org/XML/1998/namespace`)
### Enhanced
- Regex-based namespace prefix validation at Rust level
- Production-safe error handling for all namespace operations
- Extended test suite with 31 tests covering namespace edge cases
## [0.1.0] - 2025-08-23
### Added
- Lightning-fast XML parsing via Rust NIFs using sxd-document and sxd-xpath
- Full XPath 1.0 specification support
- Parse-once, query-many Document resource API for high performance
- Single-shot `select/2` API for simple use cases
- Comprehensive error handling with detailed error atoms
- Thread-safe Document resources for concurrent access
- Memory-efficient XML storage in Rust heap
- Automatic resource cleanup via Erlang garbage collection
- Support for all major platforms (Linux, macOS, Windows)
- Special Apple Silicon (M1/M2/M3/M4) support with optimized linking
- Comprehensive benchmark suite comparing performance with SweetXml
- Extensive test coverage (23+ tests)
- World-class documentation with detailed examples
- Code quality tooling (Credo for Elixir, Clippy for Rust)
- Performance improvements: 2-10x faster than alternatives
- Memory efficiency: up to 195,000x less memory usage than SweetXml
### Performance Highlights
- **Small documents (644B)**: 2-3x faster
- **Medium documents (5.6KB)**: 2.3x faster
- **Large documents (904KB)**: 8-10x faster
### API Functions
- `Expath.select/2` - Single XPath query with XML parsing
- `Expath.new/1` - Parse XML into reusable Document resource
- `Expath.query/2` - Query Document resource with XPath
- Low-level NIFs: `parse_xml/1`, `xpath_select/2`, `parse_document/1`, `query_document/2`
### Error Handling
- `{:error, :invalid_xml}` - XML parsing failed
- `{:error, :invalid_xpath}` - XPath expression invalid
- `{:error, :xpath_error}` - XPath evaluation failed
### Platform Support
- Linux (x86_64, aarch64)
- macOS (Intel x64, Apple Silicon M1/M2/M3/M4)
- Windows (x86_64)
- Automatic NIF compilation with Rustler
- Pre-compiled binaries for major platforms
### Dependencies
- Elixir 1.18+
- Erlang/OTP 27+
- Rust 1.70+ (for compilation)
- Rustler ~> 0.34
### Development Tools
- Comprehensive benchmark suite (`mix run bench/benchmark.exs`)
- Code quality: Credo configuration with 88+ checks
- Rust linting: Cargo Clippy integration
- Security: Cargo audit integration
- Documentation: ExDoc with detailed API reference
[Unreleased]: https://github.com/wearecococo/expath/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/wearecococo/expath/releases/tag/v0.1.0