Download the PHP package tacman/nitf-parser without Composer
On this page you can find all versions of the php package tacman/nitf-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tacman/nitf-parser
More information about tacman/nitf-parser
Files in tacman/nitf-parser
Download tacman/nitf-parser
More information about tacman/nitf-parser
Files in tacman/nitf-parser
Vendor tacman
Package nitf-parser
Short Description Parse NITF (News Industry Text Format) XML documents into a flat structure for search indexing
License MIT
Package nitf-parser
Short Description Parse NITF (News Industry Text Format) XML documents into a flat structure for search indexing
License MIT
Please rate this library. Is it a good library?
Informations about the package nitf-parser
NITF Parser
A PHP library for parsing NITF (News Industry Text Format) XML documents into a flat, searchable structure optimized for Meilisearch and similar full-text search engines.
Installation
Requirements
- PHP 8.4+
Quick Start
Available Fields
The NTF class provides these public properties:
| Property | Type | Description |
|---|---|---|
$id |
string |
Document ID (from doc-id/@id-string) |
$headline |
string |
Main headline (from hl1) |
$subhead |
string |
Sub-headline (from hl2) |
$byline |
string |
Author byline |
$summary |
string |
Article summary/abstract |
$body |
string |
Full body text (all <p> elements joined) |
$keywords |
string[] |
Keywords from key-list |
$categories |
array |
Classifications as ['type' => '...', 'value' => '...'] |
$images |
array |
Media references with source, name, mimeType |
$publishedAt |
?DateTime |
Publication date |
$modifiedAt |
?DateTime |
Last modification date |
$section |
?string |
Publication section |
$type |
?string |
Publication type |
Meilisearch Integration
The toSearchable() method returns a flat array ready for direct indexing:
The searchable array includes all fields with:
publishedAtandmodifiedAtas ISO 8601 stringskeywordsas an arraycategoriesandimagesas JSON arrays
Zip File Processing
Process large archives efficiently using the generator:
The zip parser:
- Only processes
.xmlfiles - Skips invalid XML files silently
- Uses a generator for memory efficiency
Example
Given a NITF XML file:
You get:
Testing
License
MIT
All versions of nitf-parser with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.4
The package tacman/nitf-parser contains the following files
Loading the files please wait ...