Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No tables result from XMLAdapter.LoadXML in VFP8
Message
De
25/03/2005 08:37:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
24/03/2005 21:15:51
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00999075
Message ID:
00999119
Vues:
35
>I want to create a set of cursors from an XML file. There are 3 associated Schemas that must be used together. The Schemas and XML data files are from a Standards organization so I am confident of their correctness. I have slightly modified a FoxPro sample program but cannot get past the first step. After the XMLAdapter.LoadXML command the value of oXMLAdapter.Tables.Count is zero and oXMLAdapter.SOM is NULL. I do not get an error message on the LoadXML command. Is there something else I have to do if I have 3 related Schemas? How can I get my XML file into FoxPro tables? Here is part of the code:
>
>
>LOCAL lcFile as String
>LOCAL oXMLAdapter as XMLAdapter
>
>* Name of an XML file.
>lcFile = "c:\sedi_8\sedi_xml\transcript_inst_courses_only.xml"
>
>* Create an XMLAdapter object to load the XML file into.
>oXMLAdapter = NEWOBJECT('XMLAdapter')
>
>   TRY
>      * Read the XML file into the XMLAdapter object.
>      oXMLAdapter.LoadXML(lcFile, .T.)
>      WAIT WINDOW "Number of Tables: " + STR(oXMLAdapter.Tables.Count)
>
>
>Thanks for any insights you can offer.
>
>

I wouldn't be confident. They might be correct but it's almost hard to find an incorrect one. Legally you can create an hierarchical XML in a zillion ways.
For example, you can load a .Net generated hierarchical XML with no problems and you'd have N tables. However, try another XML, again from MS, but this time ADO generated hierarchical:) IOW, VFP's XMLAdapter as far as I could see doesn't work with all types of hierachical XMLs (and I think this is documented).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform