title: CSV cvc-datatype-valid.1.2.1: '' is not a valid value for 'double'. CSV file error
body: <p>i am getting an error reading a <code>csv</code> file, in this file i store values that has to be of a specific data type for generate an invoice (known as facturae, or electronic bill), so the problem is that i get the error:</p>
  
  <pre><code>cvc-datatype-valid.1.2.1: '' is not a valid value for 'double' error
  </code></pre>
  
  <p>This is the <code>csv</code> file (i use ; as delimiter in this file, we can call it a database, because contains the values needed for generate 5 invoices) where i get the error:</p>
  
  <p><a href="https://i.stack.imgur.com/DTswx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DTswx.png" alt="enter image description here"></a></p>
  
  <p>Background: I use a xml file as template that contains fields that will be replaced by the values that you see in the csv file, </p>
  
  <p>I see in other threads in stackoverflow similar errors but i didn't found out the problem, i read that the error is due to empty fields, i took care that i don't have empty fields in csv file, in others talk about <code>"</code> as text delimiter, i don't understand much about that.</p>
  
  <p>Any help would be aprreciated. Thank you.</p>
  
  <p>PD: I imagine that you will not have problems with the csv file, some fields are in Spanish, it is an example invoice, what matters is the format and the type of the data</p>
  
  <p>One of the xml invoices generated (i use a c++ code for mix the information in the database(<code>csv</code> file) with the fields in the template(<code>xml</code> file), i think it's not relevant to put it here):</p>
  
  <pre><code>    &lt;fe:Facturae xmlns:fe="http://www.facturae.es/Facturae/2009/v3.2/Facturae" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.facturae.es/Facturae/2009/v3.2/Facturae"&gt;
    &lt;FileHeader&gt;
      &lt;SchemaVersion&gt;3.2&lt;/SchemaVersion&gt;
      &lt;Modality&gt;I&lt;/Modality&gt;
      &lt;InvoiceIssuerType&gt;EM&lt;/InvoiceIssuerType&gt;
      &lt;Batch&gt;
        &lt;BatchIdentifier&gt;125&lt;/BatchIdentifier&gt;
        &lt;InvoicesCount&gt;185&lt;/InvoicesCount&gt;
        &lt;TotalInvoicesAmount&gt;
          &lt;TotalAmount&gt;98.27&lt;/TotalAmount&gt;
        &lt;/TotalInvoicesAmount&gt;
        &lt;TotalOutstandingAmount&gt;
          &lt;TotalAmount&gt;98.27&lt;/TotalAmount&gt;
        &lt;/TotalOutstandingAmount&gt;
        &lt;TotalExecutableAmount&gt;
          &lt;TotalAmount&gt;98.27&lt;/TotalAmount&gt;
        &lt;/TotalExecutableAmount&gt;
        &lt;InvoiceCurrencyCode&gt;EUR&lt;/InvoiceCurrencyCode&gt;
      &lt;/Batch&gt;
    &lt;/FileHeader&gt;
    &lt;Parties&gt;
      &lt;SellerParty&gt;
        &lt;TaxIdentification&gt;
          &lt;PersonTypeCode&gt;J&lt;/PersonTypeCode&gt;
          &lt;ResidenceTypeCode&gt;R&lt;/ResidenceTypeCode&gt;
          &lt;TaxIdentificationNumber&gt;28.22&lt;/TaxIdentificationNumber&gt;
        &lt;/TaxIdentification&gt;
        &lt;LegalEntity&gt;
          &lt;CorporateName&gt;36.84&lt;/CorporateName&gt;
          &lt;RegistrationData/&gt;
          &lt;AddressInSpain&gt;
            &lt;Address&gt;
            29.6
            &lt;/Address&gt;
            &lt;PostCode&gt;31565&lt;/PostCode&gt;
            &lt;Town&gt;33&lt;/Town&gt;
            &lt;Province&gt;35&lt;/Province&gt;
            &lt;CountryCode&gt;ESP&lt;/CountryCode&gt;
          &lt;/AddressInSpain&gt;
          &lt;ContactDetails&gt;
            &lt;Telephone&gt;37&lt;/Telephone&gt;
            &lt;ElectronicMail&gt;39&lt;/ElectronicMail&gt;
            &lt;ContactPersons&gt;41&lt;/ContactPersons&gt;
          &lt;/ContactDetails&gt;
        &lt;/LegalEntity&gt;
      &lt;/SellerParty&gt;
      &lt;BuyerParty&gt;
        &lt;TaxIdentification&gt;
          &lt;PersonTypeCode&gt;J&lt;/PersonTypeCode&gt;
          &lt;ResidenceTypeCode&gt;R&lt;/ResidenceTypeCode&gt;
          &lt;TaxIdentificationNumber&gt;434&lt;/TaxIdentificationNumber&gt;
        &lt;/TaxIdentification&gt;
        &lt;AdministrativeCentres&gt;
          &lt;AdministrativeCentre&gt;
              &lt;CentreCode&gt;45&lt;/CentreCode&gt;
              &lt;RoleTypeCode&gt;01&lt;/RoleTypeCode&gt;
              &lt;Name&gt;47&lt;/Name&gt;
              &lt;AddressInSpain&gt;
                  &lt;Address&gt;C/ &lt;/Address&gt;
                  &lt;PostCode&gt;98034&lt;/PostCode&gt;
                  &lt;Town&gt;Le Havre&lt;/Town&gt;
                  &lt;Province&gt;Tenerife&lt;/Province&gt;
                  &lt;CountryCode&gt;ESP&lt;/CountryCode&gt;
              &lt;/AddressInSpain&gt;
              &lt;CentreDescription&gt;92.5&lt;/CentreDescription&gt;
          &lt;/AdministrativeCentre&gt;
          &lt;AdministrativeCentre&gt;
              &lt;CentreCode&gt;90.65&lt;/CentreCode&gt;
              &lt;RoleTypeCode&gt;02&lt;/RoleTypeCode&gt;
              &lt;Name&gt;88&lt;/Name&gt;
              &lt;AddressInSpain&gt;
                  &lt;Address&gt;C/ &lt;/Address&gt;
                  &lt;PostCode&gt;84865&lt;/PostCode&gt;
                  &lt;Town&gt;Dover&lt;/Town&gt;
                  &lt;Province&gt;Calais&lt;/Province&gt;
                  &lt;CountryCode&gt;ESP&lt;/CountryCode&gt;
              &lt;/AddressInSpain&gt;
              &lt;CentreDescription&gt;Alien&lt;/CentreDescription&gt;
          &lt;/AdministrativeCentre&gt;
          &lt;AdministrativeCentre&gt;
              &lt;CentreCode&gt;568&lt;/CentreCode&gt;
              &lt;RoleTypeCode&gt;03&lt;/RoleTypeCode&gt;
              &lt;Name&gt;35&lt;/Name&gt;
              &lt;AddressInSpain&gt;
                  &lt;Address&gt;C/ &lt;/Address&gt;
                  &lt;PostCode&gt;93107&lt;/PostCode&gt;
                  &lt;Town&gt;Valencia&lt;/Town&gt;
                  &lt;Province&gt;Castellon&lt;/Province&gt;
                  &lt;CountryCode&gt;ESP&lt;/CountryCode&gt;
              &lt;/AddressInSpain&gt;
              &lt;CentreDescription&gt;96543&lt;/CentreDescription&gt;
              &lt;/AdministrativeCentre&gt;
          &lt;/AdministrativeCentres&gt;
        &lt;LegalEntity&gt;
          &lt;CorporateName&gt;Juan&lt;/CorporateName&gt;
          &lt;RegistrationData/&gt;
          &lt;AddressInSpain&gt;
            &lt;Address&gt;
            Suecia
            &lt;/Address&gt;
            &lt;PostCode&gt;34885&lt;/PostCode&gt;
            &lt;Town&gt;Palermo&lt;/Town&gt;
            &lt;Province&gt;Sicilia&lt;/Province&gt;
            &lt;CountryCode&gt;ESP&lt;/CountryCode&gt;
          &lt;/AddressInSpain&gt;
          &lt;ContactDetails&gt;
            &lt;ContactPersons&gt;658476806&lt;/ContactPersons&gt;
          &lt;/ContactDetails&gt;
        &lt;/LegalEntity&gt;
      &lt;/BuyerParty&gt;
    &lt;/Parties&gt;
    &lt;Invoices&gt;
      &lt;Invoice&gt;
        &lt;InvoiceHeader&gt;
          &lt;InvoiceNumber&gt;1&lt;/InvoiceNumber&gt;
          &lt;InvoiceSeriesCode/&gt;
          &lt;InvoiceDocumentType&gt;FC&lt;/InvoiceDocumentType&gt;
          &lt;InvoiceClass&gt;OO&lt;/InvoiceClass&gt;
        &lt;/InvoiceHeader&gt;
        &lt;InvoiceIssueData&gt;
          &lt;IssueDate&gt;2018-04-22&lt;/IssueDate&gt;
          &lt;OperationDate&gt;2018-04-21&lt;/OperationDate&gt;
          &lt;InvoiceCurrencyCode&gt;EUR&lt;/InvoiceCurrencyCode&gt;
          &lt;TaxCurrencyCode&gt;EUR&lt;/TaxCurrencyCode&gt;
          &lt;LanguageName&gt;es&lt;/LanguageName&gt;
        &lt;/InvoiceIssueData&gt;
        &lt;TaxesOutputs&gt;
          &lt;Tax&gt;
            &lt;TaxTypeCode&gt;03&lt;/TaxTypeCode&gt;
            &lt;TaxRate&gt;7.00&lt;/TaxRate&gt;
            &lt;TaxableBase&gt;
              &lt;TotalAmount&gt;843.25&lt;/TotalAmount&gt;
            &lt;/TaxableBase&gt;
            &lt;TaxAmount&gt;
              &lt;TotalAmount&gt;158.00&lt;/TotalAmount&gt;
            &lt;/TaxAmount&gt;
            &lt;EquivalenceSurchargeAmount&gt;
              &lt;TotalAmount&gt;0.00&lt;/TotalAmount&gt;
            &lt;/EquivalenceSurchargeAmount&gt;
          &lt;/Tax&gt;
        &lt;/TaxesOutputs&gt;
        &lt;InvoiceTotals&gt;
          &lt;TotalGrossAmount&gt;843.25&lt;/TotalGrossAmount&gt;
          &lt;TotalGrossAmountBeforeTaxes&gt;843.25&lt;/TotalGrossAmountBeforeTaxes&gt;
          &lt;TotalTaxOutputs&gt;158.00&lt;/TotalTaxOutputs&gt;
          &lt;TotalTaxesWithheld&gt;0.00&lt;/TotalTaxesWithheld&gt;
          &lt;InvoiceTotal&gt;98.27&lt;/InvoiceTotal&gt;
          &lt;TotalOutstandingAmount&gt;98.27&lt;/TotalOutstandingAmount&gt;
          &lt;TotalExecutableAmount&gt;98.27&lt;/TotalExecutableAmount&gt;
        &lt;/InvoiceTotals&gt;
        &lt;Items&gt;
          &lt;InvoiceLine&gt;
            &lt;IssuerTransactionReference/&gt;
            &lt;ItemDescription&gt;  &lt;/ItemDescription&gt;
            &lt;Quantity&gt;&lt;/Quantity&gt;
            &lt;UnitOfMeasure&gt;01&lt;/UnitOfMeasure&gt;
            &lt;UnitPriceWithoutTax&gt;843.250000&lt;/UnitPriceWithoutTax&gt;
            &lt;TotalCost&gt;843.250000&lt;/TotalCost&gt;
            &lt;GrossAmount&gt;843.250000&lt;/GrossAmount&gt;
            &lt;TaxesOutputs&gt;
              &lt;Tax&gt;
                &lt;TaxTypeCode&gt;03&lt;/TaxTypeCode&gt;
                &lt;TaxRate&gt;7.00&lt;/TaxRate&gt;
                &lt;TaxableBase&gt;
                  &lt;TotalAmount&gt;843.25&lt;/TotalAmount&gt;
                &lt;/TaxableBase&gt;
                &lt;TaxAmount&gt;
                  &lt;TotalAmount&gt;158.00&lt;/TotalAmount&gt;
                &lt;/TaxAmount&gt;
                &lt;EquivalenceSurchargeAmount&gt;
                  &lt;TotalAmount&gt;0.00&lt;/TotalAmount&gt;
                &lt;/EquivalenceSurchargeAmount&gt;
              &lt;/Tax&gt;
            &lt;/TaxesOutputs&gt;
            &lt;AdditionalLineItemInformation/&gt;
          &lt;/InvoiceLine&gt;
          &lt;InvoiceLine&gt;
            &lt;IssuerTransactionReference/&gt;
            &lt;ItemDescription&gt;  &lt;/ItemDescription&gt;
            &lt;Quantity&gt;&lt;/Quantity&gt;
            &lt;UnitOfMeasure&gt;01&lt;/UnitOfMeasure&gt;
            &lt;UnitPriceWithoutTax&gt;843.250000&lt;/UnitPriceWithoutTax&gt;
            &lt;TotalCost&gt;843.250000&lt;/TotalCost&gt;
            &lt;GrossAmount&gt;843.250000&lt;/GrossAmount&gt;
            &lt;TaxesOutputs&gt;
              &lt;Tax&gt;
                &lt;TaxTypeCode&gt;03&lt;/TaxTypeCode&gt;
                &lt;TaxRate&gt;7.00&lt;/TaxRate&gt;
                &lt;TaxableBase&gt;
                  &lt;TotalAmount&gt;843.25&lt;/TotalAmount&gt;
                &lt;/TaxableBase&gt;
                &lt;TaxAmount&gt;
                  &lt;TotalAmount&gt;158.00&lt;/TotalAmount&gt;
                &lt;/TaxAmount&gt;
                &lt;EquivalenceSurchargeAmount&gt;
                  &lt;TotalAmount&gt;0.00&lt;/TotalAmount&gt;
                &lt;/EquivalenceSurchargeAmount&gt;
              &lt;/Tax&gt;
            &lt;/TaxesOutputs&gt;
            &lt;AdditionalLineItemInformation/&gt;
          &lt;/InvoiceLine&gt;
        &lt;/Items&gt;
        &lt;PaymentDetails&gt;
          &lt;Installment&gt;
            &lt;InstallmentDueDate&gt;2018-04-22&lt;/InstallmentDueDate&gt;
            &lt;InstallmentAmount&gt;98.27&lt;/InstallmentAmount&gt;
            &lt;PaymentMeans&gt;04&lt;/PaymentMeans&gt;
            &lt;AccountToBeCredited&gt;
              &lt;IBAN&gt;&lt;/IBAN&gt;
            &lt;/AccountToBeCredited&gt;
          &lt;/Installment&gt;
        &lt;/PaymentDetails&gt;
        &lt;AdditionalData&gt;
          &lt;InvoiceAdditionalInformation&gt;Facturae generado por los alumnos &lt;/InvoiceAdditionalInformation&gt;
        &lt;/AdditionalData&gt;
      &lt;/Invoice&gt;
    &lt;/Invoices&gt;
  &lt;/fe:Facturae&gt;
  </code></pre>