<?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 >ENDFOR>And finally, put this code into outputtables.prg:
LPARAMETERS oXMLA >LOCAL oTable AS XMLTable >FOR EACH oTable IN oXMLA.Tables > oTable.ToCursor() >ENDFOR>Now 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.
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature