Best way to import XML Files

George Simon flowersoft at compuserve.com
Sun Jun 20 03:27:12 PDT 2004


> George Simon wrote:
> >
> > If I'm still limited by the 32K field size, what is the difference?
> [...]
> > -----Original Message-----
> > From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> [...]
> > If you're going to read the entire file in one gulp anyway, why not just
> > use the file I/O functions instead?
> >
> > Just remember that you're still limited to the 32K-1 field size.
>
> First, you don't have to hope that the specified character never appears
> in the file.
OK, I've got that covered.

> Second, you don't have to make sure that PFIMPBUF has been
> set to allow everything to be slurped at once.


Not a big problem.

> Third, you can read the file in chunks if necessary, without having to
worry that an IMPORT will
> truncate the data because it didn't hit a record delimiter before reading
the maximum input length.

Did you mean to say here "because it DID hit a record delimiter..." and
isn't that covered under you first point?

My concern with reading the data in chunks of  xxxx number of bytes and
stuffing that into a dummy and then reading the file again and stuffing it
into another dummy, etc., etc. until you reach the end of the file is... how
do you know where the first chunk of data ended?  Maybe you cut it off in
the middle of the data or in the middle of a tag.  I'm sure there must be
ways around this, but it seems to me that's a lot of things to worry about
_if_ you don't have to.  Is there any easy solution to this problem?




More information about the Filepro-list mailing list