XML problem

Richard Kreiss rkreiss at gccconsulting.net
Thu Jul 18 08:53:12 PDT 2013


I have a program that parses a return xml file that has been in use since 2006.  There has been no change in the parsing code since then.

The other day, my client called to say that the records had not been updated properly.  This is a credit card approval program.

As I have been keeping a copy of the response files, I checked them out and they are still in the same bad xml format as they have been for the last 7 years.

I copied the program and removed all of the submission parts of the program leaving the import/parse portion.

I then reread each of the 27 files with the debugger to check the parsing of each of the tags.  The program parsed the values correctly.

I then compared the code in my new file to the code in the original and they are the same.

I ran one credit card this morning and again found the program was not parsing the tag values properly.   By that I mean, the first 3 values were incomplete, too short.

The tag values are posted into an array which overlays the real fields that the values need to post to.

When I ran the re-run program on these records, everything posted in correctly.

I have a sleep "500" before reading in the file.  I used a msgbox to display the information read in so I know that the program is getting the proper information.

Any suggestions as to why on the initial run the program is failing to parse correctly but when the same parsing routine is run a second time, it works properly?


Richard Kreiss
GCC Consulting

Office: 410-653-2813





More information about the Filepro-list mailing list