@thornfe/jira-xml-parser
v0.1.15-alpha.0
Published
Lightweight Jira Xml Parser for big files (uses sax)
Readme
@thornfe/jira-xml-parser
A lightweight Jira XML parser built on sax, specifically designed for handling large files.
Only support Jira Entity File now.
Features
- Optimized for large XML files (1GB+)
- Low memory footprint
- Stream processing support
- Written in TypeScript with complete type definitions
Installation
npm install @thornfe/jira-xml-parserUsage
import { XmlReader } from '@thornfe/jira-xml-parser';
const reader = new XmlReader();
// Read specific entities
reader.on('entity', (entity) => {
console.log(entity);
});
// Handle errors
reader.on('error', (error) => {
console.error(error);
});
// Start parsing
reader.parse('path/to/your/file.xml');API
XmlReader
The main parser class that emits the following events:
entity: Triggered when a matching entity is founderror: Triggered when an error occurs during parsingend: Triggered when parsing is complete
License
MIT
