https://github.com/php-edifact/untdid-parser
Parse and convert to XML UN/EDIFACT Directories
https://github.com/php-edifact/untdid-parser
Last synced: about 2 months ago
JSON representation
Parse and convert to XML UN/EDIFACT Directories
- Host: GitHub
- URL: https://github.com/php-edifact/untdid-parser
- Owner: php-edifact
- License: lgpl-3.0
- Created: 2016-09-18T20:25:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-11-07T14:10:38.000Z (4 months ago)
- Last Synced: 2025-11-07T16:12:17.161Z (4 months ago)
- Language: PHP
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# untdid-parser
Parse and convert UN/EDIFACT Directories to XML. UNTDID stands for "United Nations Trade Data Interchange Directory".
Example:
```php
$p = new EDMDParser('D00A/EDMD/CODECO_D.00A');
echo $p->getXML();
```
The runner.php automates data extraction for all documents in a single zipped directory on a best effort basis:
```
php runner.php 99B
```
```
for i in {97..99}; do
php runner.php ${i}A;
php runner.php ${i}B;
done
for i in {0..9}; do
php runner.php 0${i}A;
php runner.php 0${i}B;
done
php runner.php 01C;
for i in {10..22}; do
php runner.php ${i}A;
php runner.php ${i}B;
done
```
Supported documents:
* Message type directory Batch (EDMD)
* Segment directory Batch (EDSD)
* Composite data element directory Batch (EDCD)
* Data element directory (EDED)
* Code list (UNCL)
* Service codes (UNSL for v3, SL for v4)
The Directories are released on the UNECE website: https://unece.org/trade/uncefact/unedifact/download
The service codes instead are released on the ISO Joint Working Group website: http://www.gefeg.com/jswg/