You are here:  » Parsing stops early on XML file?


Parsing stops early on XML file?

Submitted by r_s on Fri, 2011-09-09 17:52 in

I have a parsing routine that fore some reason stops after 221 records. It's a sample file with 500 records, all identical in structure. I have specified the same memory and timeout settings that I use or other import routines that handle tens of thousands of records with no problems. What could be happening? I'm not getting any error messages. Thanks in advance...

Submitted by support on Fri, 2011-09-09 18:41

Hi,

Thanks for submitting the file via the Get It Coded form. The XML is actually broken 222'nd record as the <description> element is not terminated. The error is at line 1774, which contains:

<Description>Lorem ipsum 10332 dolor sit amet, consectetur adipiscing elit. Maecenas ante urna, posuere ac tempus ut, fringilla nec lorem. Aliquam quis ultricies dolor. In hac habitasse platea dictumst. Sed tincidunt nisi a velit fringilla egestas auctor tortor dictum. Sed dolor sem, varius nec volutpat vitae, ullamcorper non lorem. Fusce quis dignissim massa. Sed quis lectus et lectus lobortis rutrum ac ut quam. Donec turpis sem, vehicula nec dictum id, commodo vel sapien.Description>

Notice how the the </ is missing from the closing Description element. Once corrected at your test source the parse should continue to process all records..

Hope this helps!
Cheers,
David.