diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/reader/EInvoiceReader.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/reader/EInvoiceReader.kt index e2e6e9f..4fadd38 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/reader/EInvoiceReader.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/reader/EInvoiceReader.kt @@ -10,6 +10,13 @@ open class EInvoiceReader( protected open val mapper: MustangMapper = MustangMapper() ) { + companion object { + val KnownEInvoiceXmlAttachmentNames = listOf( + "factur-x.xml", "zugferd-invoice.xml", "xrechnung.xml" // also "ZUGFeRD-invoice.xml" is found but we make compare case insensitive anyway + ) + } + + open fun extractFromXml(xmlFile: File) = extractFromXml(xmlFile.inputStream()) open fun extractFromXml(stream: InputStream) = extractFromXml(stream.reader().readText())