Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert text file into XML
Message
De
02/04/2018 08:52:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01659084
Message ID:
01659091
Vues:
61
>Unless your file is absolutely massive, FILETOSTR() and a string insertion is going to be blazing fast - this is not something you should worry about unless you have multi-megabyte file that exceeds 16 megs. In that case you have to be careful as you won't be able to simply concat the header and footer to the string (you'd have to write out file as stream).

But then an XML of that size would be unwieldy in any context, and may break something even if it was syntactically perfect.

>What's more concerning though is - why is the data you are receiving invalid, non-parsable XML in the first place?

You wouldn't believe what's out there (except you've been out there and seen even more crap than I did). I had to handle a headerless xml, with numerous inconsistencies in naming but generously peppered with sixtuple line breaks - from a company whose worth is in dozens of millions and whose main reason to exist is exchange and aggregation of information and then passing the processed and validated data further down the chain. IOW, a professional intermediary makes millions passing xml back and forth - and still can't get around to have a header in it. Luckily, MS Xml parser doesn't care, reads it fine.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform