<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?> <VFPData> </VFPData>Also, create this little PRG in walktables.prg (useful for seeing what is structured in the XMLAdapter):
LPARAMETERS oXMLA LOCAL oTable AS XMLTable LOCAL oField AS XMLField CLEAR ? "XMLADAPTER: " + STRCONV(oXMLA.XMLName,6) ? "----------------------------" FOR EACH oTable IN oXMLA.Tables ? ? "TABLE: XMLName= "+STRCONV(oTable.XMLName,6)+", Alias= "+oTable.Alias FOR EACH oField IN oTable.Fields ? " FIELD: XMLName= "+STRCONV(oField.XMLName,6)+", Datatype= "+; oField.datatype+", MaxLength= "+TRANSFORM(oField.MaxLength) ENDFOR ENDFORAnd finally, put this code into outputtables.prg:
LPARAMETERS oXMLA LOCAL oTable AS XMLTable FOR EACH oTable IN oXMLA.Tables oTable.ToCursor() ENDFORNow for each XSD schema, reference it in the XMLAdapter's XMLSchemaLocation property before using LoadXML to read in the dummy.xml:
o=CREATEOBJECT("XMLAdapter") o.XMLSchemaLocation="myfirstxsd.xsd" o.LoadXML("dummy.xml",.t.)At this point, if the schema could be interpreted by XMLAdapter (some are too complex), you will end up with a set of XMLTable and XMLField objects, which you can find out about like this:
walktables(o)Assuming that you find some table and field objects there, you can output them to empty cursors like this:
outputtables(o)I hope this helps point you in the right direction.