Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLAdapter Limitation ?
Message
 
 
À
02/02/2004 15:00:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00872205
Message ID:
00873116
Vues:
26
Dimitris,

Don't give up on XML entirely just because XMLToCursor() doesn't work process large XML files fast enough.

It's not that hard to create an XML reader in VFP that reads a large document and writes it out to a table. It'll basically operate on one row at a time instead of trying to load the whole document into a tree at once.

If there are no optional fields in the XML the process can be done with a single pass through the document. If there are optional fields it requires two full passes through the document, one to find the structure and one to get the data. If a schema is available the task is easier and you can get the data in one pass. If you follow a convention that allows you to easily know the destination table then you don't have to worry about structure (assuming you use some other technique to implement table structure changes between both sides) and can read the document in one pass.

It's also worth mentioning that depending on your tables the XML document might end up as a much larger file than simply sending a dbf.

>I am considering the possibility to use a Web service for collecting and/or sending various tables from/to client PCs to/from a central server. At the beginning it seemed to me very easy and flexible to use an xml string to pass the table to/from the server ( as an alternative to use an ftp method or using my own methods to parse the xml ...). But now i realize that what you get in terms of flexibility you loose it in performance ...
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform