Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limits of XMLAdapter to load XML with complex schema
Message
De
04/04/2005 16:42:50
 
 
À
01/04/2005 21:14:51
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01000907
Message ID:
01001363
Vues:
239
>I tried running the same program in VFP9 Beta. The statement:
>

>adapter.LoadXML(lcFile,.T.)
>

>gave the message: "XML Schema is too complex."

>What are the limits of the XMLAdapter? Or could it be something in the Schema header that I could change that the XMLAdapter doesn't understand?

There could be several approaches to solve your problem, including slicing and dicing and XML (or transforming it via XSL) into something that is readable. Is the schema embedded in the XML doc or is it a separate XSD file?

With VFP9, you can also manually set up some XMLtable and XMLfield objects and use XPath expressions to point them to the correct places in the XML, and the XMLField objects can have all their properties set manually for type, length, etc, allowing you to completely bypass the schema.

If the XML (without the schema) is arranged in a way that VFP can understand, you can also possibly use XMLTOCURSOR to output into a cursor you have already created with the correct design (use 512 flag to append to a cursor). XMLTOCURSOR in some cases can handle things that XMLAdapter cannot without special settings.

Without seeing the XML, it's hard to say what the possibilities are (check your email).

David Stevenson, MCSD / St. Petersburg, FL USA / david@topstrategies.com

David,
Thanks for your suggestions. The schema is not embedded, it is 3 separate XSD files that must be used together. I can't use VFP9, I was only trying the Beta version in case I got different results, which I didn't. And bypassing the schema is not an option either since it represents a Standard which shouldn't be changed. Someone suggested trying to use the XMLDOM object so I will see how that works.
Thanks.
Susan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform