Hi,
We discovered a library malfunction in a very specific case. We have received a PDF invoice file from another software which contains a facturx.xml file inside.
When we try to parse the XML file with the library, an exception is thrown :
System.Exception : 'Wrong length of datetime element (format 102)'
s2industries.ZUGFeRD.XmlUtils.NodeAsDateTime(System.Xml.XmlNode, string, System.Xml.XmlNamespaceManager, System.DateTime?) dans XmlUtils.cs
s2industries.ZUGFeRD.InvoiceDescriptor22CIIReader.Load(System.IO.Stream) dans InvoiceDescriptor22CIIReader.cs
While analyzing the file, we discovered a strange value in date fields. All date fields contain spaces and LF characters.
We have checked the file with fnfe-mpe.org validator, and the file appears to be correct.
In the Factur-X specification, there is no information about these characters.
In my opinion, the emitter software should be fixed. But I'm not sure they'll do it on their end. So to protect this, I suggest adding this code in XmlUtils.cs / NodeAsDateTime.
rawValue = rawValue.Trim();.
I'll create a PR for that, and on the other hand, I will contact emitter software developper for asking to request a fix.
Hi, We discovered a library malfunction in a very specific case. We have received a PDF invoice file from another software which contains a facturx.xml file inside. When we try to parse the XML file with the library, an exception is thrown :
While analyzing the file, we discovered a strange value in date fields. All date fields contain spaces and LF characters.
We have checked the file with fnfe-mpe.org validator, and the file appears to be correct. In the Factur-X specification, there is no information about these characters.
In my opinion, the emitter software should be fixed. But I'm not sure they'll do it on their end. So to protect this, I suggest adding this code in XmlUtils.cs / NodeAsDateTime.
rawValue = rawValue.Trim();
.I'll create a PR for that, and on the other hand, I will contact emitter software developper for asking to request a fix.
What do you think ?
Best Regards