>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