title: Getting the Notepad++ XML parsing error "Extra content at the end of the document" even though there is none
body: <p>I am getting the abovementioned error message when trying to validate my 55 mb XML file in Notepad++.
  The first enocountered error is here (line 1441520 out of 22258651):
  <a href="http://i.stack.imgur.com/9Atcb.jpg" rel="nofollow">Screenshot from Notepad++</a></p>
  
  <p>I have turned on Show all characters. Nothing suggests that there should be any illegal characters at the end of the line. As you can see on the screenshot there are no other hidden characters than CR+LF.</p>
  
  <p>EDIT:
  Below is a copy of the record that causes the parsing error in Notepad++:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Registreringer&gt;
    &lt;Registrering&gt;
      &lt;ID&gt;1697947&lt;/ID&gt;
      &lt;LHAnr&gt;316-01&lt;/LHAnr&gt;
      &lt;RegId&gt;316-01K1037&lt;/RegId&gt;
      &lt;RegType /&gt;
      &lt;Signatur&gt;K&lt;/Signatur&gt;
      &lt;Regnr&gt;1037&lt;/Regnr&gt;
      &lt;srnr /&gt;
      &lt;ArkivSkaber /&gt;
      &lt;Journalnr /&gt;
      &lt;Sted&gt;460872&lt;/Sted&gt;
      &lt;sted1&gt;315&lt;/sted1&gt;
      &lt;sted2&gt;12&lt;/sted2&gt;
      &lt;sted3&gt;0&lt;/sted3&gt;
      &lt;UTM /&gt;
      &lt;Betegnelse&gt;
  Hidden.
  
  Hidden.
  &lt;/Betegnelse&gt;
      &lt;kat1 /&gt;
      &lt;kat2 /&gt;
      &lt;kat3 /&gt;
      &lt;kat4 /&gt;
      &lt;Datering&gt;1804&lt;/Datering&gt;
      &lt;DateringNote /&gt;
      &lt;Klausul&gt;Almindelige regler&lt;/Klausul&gt;
      &lt;Bem /&gt;
      &lt;BemEx1 /&gt;
      &lt;BemEx2 /&gt;
      &lt;IntBem /&gt;
      &lt;KortResume&gt;
  Hidden
  
  Opmaalt 1804 af Hidden.
  &lt;/KortResume&gt;
      &lt;SogeOrd /&gt;
      &lt;RegDato&gt;25-04-2000 00:00:00&lt;/RegDato&gt;
      &lt;RegAf&gt;Hidden&lt;/RegAf&gt;
      &lt;GodkDato /&gt;
      &lt;Godkendt /&gt;
      &lt;Varighed /&gt;
      &lt;Fra&gt;1804&lt;/Fra&gt;
      &lt;Til&gt;1804&lt;/Til&gt;
      &lt;YderAar /&gt;
      &lt;Signaturer /&gt;
      &lt;IaltBind /&gt;
      &lt;IaltPakker /&gt;
      &lt;IaltLaeg /&gt;
      &lt;Stiftet /&gt;
      &lt;Nedlagt /&gt;
      &lt;hyldemeter&gt;0,00&lt;/hyldemeter&gt;
      &lt;hyldecentimeter /&gt;
      &lt;placering /&gt;
      &lt;Art&gt;Markkort&lt;/Art&gt;
      &lt;Maal&gt;26 x 38&lt;/Maal&gt;
      &lt;TeknOpl&gt;
  Affoto
  
  
  
  &lt;/TeknOpl&gt;
      &lt;Fotograf /&gt;
      &lt;Materiale /&gt;
      &lt;materiale2 /&gt;
      &lt;Negativ /&gt;
      &lt;FotografNegativ /&gt;
      &lt;foto1 /&gt;
      &lt;foto2 /&gt;
      &lt;Referencenr /&gt;
      &lt;Ref&gt;
  
  
  
  &lt;/Ref&gt;
      &lt;Motiv /&gt;
      &lt;Udgaver /&gt;
      &lt;Obs /&gt;
      &lt;billede /&gt;
      &lt;Samlingstype&gt;14&lt;/Samlingstype&gt;
      &lt;SkabelonId /&gt;
      &lt;Publicering /&gt;
      &lt;Materialetype /&gt;
      &lt;PkBind&gt;0&lt;/PkBind&gt;
      &lt;PkPakker&gt;0&lt;/PkPakker&gt;
      &lt;PkLaeg&gt;0&lt;/PkLaeg&gt;
      &lt;Henvisning&gt;
        &lt;Id&gt;3592636&lt;/Id&gt;
        &lt;LhaNr&gt;316-01&lt;/LhaNr&gt;
        &lt;RegId /&gt;
        &lt;RegRef&gt;1697947&lt;/RegRef&gt;
        &lt;SektionId /&gt;
        &lt;Henvisning&gt;Hidden&lt;/Henvisning&gt;
        &lt;StedId&gt;460872&lt;/StedId&gt;
        &lt;Fra&gt;1804&lt;/Fra&gt;
        &lt;Til&gt;1804&lt;/Til&gt;
        &lt;DecimalId&gt;1006268&lt;/DecimalId&gt;
        &lt;EmneordId&gt;1449984&lt;/EmneordId&gt;
        &lt;EmneordLokal&gt;
          &lt;id&gt;1449984&lt;/id&gt;
          &lt;LHAnr&gt;316-01&lt;/LHAnr&gt;
          &lt;DecimalId&gt;1006268&lt;/DecimalId&gt;
          &lt;Decimalklasse&gt;40.164&lt;/Decimalklasse&gt;
          &lt;Emneord&gt;Udskiftningskort&lt;/Emneord&gt;
          &lt;EmneStikord /&gt;
        &lt;/EmneordLokal&gt;
        &lt;StedLokal&gt;
          &lt;Id&gt;460872&lt;/Id&gt;
          &lt;LhaNr&gt;316-01&lt;/LhaNr&gt;
          &lt;StedKode&gt;315-12-00&lt;/StedKode&gt;
          &lt;StedTxt&gt;Hidden&lt;/StedTxt&gt;
          &lt;Sted1&gt;315&lt;/Sted1&gt;
          &lt;Sted2&gt;12&lt;/Sted2&gt;
          &lt;Sted3&gt;0&lt;/Sted3&gt;
          &lt;GenStedkode /&gt;
        &lt;/StedLokal&gt;
        &lt;DecimalLokal&gt;
          &lt;ID&gt;1006268&lt;/ID&gt;
          &lt;LHAnr&gt;316-01&lt;/LHAnr&gt;
          &lt;Decimal&gt;40.164&lt;/Decimal&gt;
          &lt;DecimalTxt&gt;Kort&lt;/DecimalTxt&gt;
          &lt;CommonDecimal&gt;40.164&lt;/CommonDecimal&gt;
          &lt;DecimalLokalStikord&gt;
            &lt;ID&gt;6969206&lt;/ID&gt;
            &lt;LHAnr&gt;316-01&lt;/LHAnr&gt;
            &lt;Decimal&gt;40.164&lt;/Decimal&gt;
            &lt;Stikord&gt;Kort&lt;/Stikord&gt;
          &lt;/DecimalLokalStikord&gt;
          &lt;DecimalLokalStikord&gt;
            &lt;ID&gt;6969207&lt;/ID&gt;
            &lt;LHAnr&gt;316-01&lt;/LHAnr&gt;
            &lt;Decimal&gt;40.164&lt;/Decimal&gt;
            &lt;Stikord&gt;Matrikelkort&lt;/Stikord&gt;
          &lt;/DecimalLokalStikord&gt;
        &lt;/DecimalLokal&gt;
      &lt;/Henvisning&gt;
    &lt;/Registrering&gt;
  &lt;/Registreringer&gt;
  </code></pre>
  
  <p>When using W3C's validator, I don't get any errors, so I suspect this is a Notepad++ specific issue with long XML files. Running EOL/blank removal scripts in Notepad++ also corrupts the file. I probably need to use a CLI based alternative... What do you recommend? @jim-garrison @villapx</p>