This commit is contained in:
2025-03-17 16:30:23 +00:00
parent bbc9b837f4
commit e929281861
20 changed files with 1777 additions and 381 deletions

View File

@ -181,12 +181,12 @@ const zugferdXml = encoder.createZugferdXml(invoiceLetterData);
#### XML Decoding for Multiple Invoice Formats
The library supports decoding multiple electronic invoice formats through the `ZUGFeRDXmlDecoder` class:
The library supports decoding multiple electronic invoice formats through the `FacturXDecoder` class:
```typescript
import { ZUGFeRDXmlDecoder } from '@fin.cx/xinvoice';
import { FacturXDecoder } from '@fin.cx/xinvoice';
const decoder = new ZUGFeRDXmlDecoder(xmlString);
const decoder = new FacturXDecoder(xmlString);
const letterData = await decoder.getLetterData();
```
@ -205,7 +205,7 @@ const encoder = new FacturXEncoder();
const xml = encoder.createFacturXXml(invoiceData);
// Decode XML back to structured data
const decoder = new ZUGFeRDXmlDecoder(xml);
const decoder = new FacturXDecoder(xml);
const extractedData = await decoder.getLetterData();
// Now extractedData contains the same information as your original invoiceData