update
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user