peteschulte
IS-IT--Management
First, THANKS TO Tek-Tips and OLAF DOSCHKE for getting me this far.
Now,
Hello Fox Programmers,
In the For loop below, we want to store each cursor to a dbf, preferably with the name assigned to it being the same as the name in the xml. We see the names in the Data Session and down in the status bar as the program creates them.
What to use to name them? A separate For loop?
I don't know how to use COPY FILE or COPY TO or RENAME when 14 files are being created and their names parsed from xml along with them. Those commands require the name, but I don't know the name at the time the command could be done.
Thanks again!!
![[2thumbsup] [2thumbsup] [2thumbsup]](/data/assets/smilies/2thumbsup.gif)
Hello Fox Programmers,
In the For loop below, we want to store each cursor to a dbf, preferably with the name assigned to it being the same as the name in the xml. We see the names in the Data Session and down in the status bar as the program creates them.
What to use to name them? A separate For loop?
I don't know how to use COPY FILE or COPY TO or RENAME when 14 files are being created and their names parsed from xml along with them. Those commands require the name, but I don't know the name at the time the command could be done.
Code:
SET DEFAULT TO \\Gmc\d\Stmt\Monterey\TEST\UB_XML\testExport\VFP8
Local lcXML, loXMLAdapter, loXMLTable
Close Tables All
xmlfile="bpexport.xml"
xmlcontent = FILETOSTR(xmlfile)
lcXML = xmlcontent
loXMLAdapter = CreateObject("XMLAdapter")
loXMLAdapter.LoadXML(lcXML,.F.,.T.)
&& XMLAdapter.LoadXML( cXMLDocument [, lFile [, lValidateOnParse ]] )
For Each loXMLTable in loXMLAdapter.Tables
loXMLTable.ToCursor()
SET STEP ON
ENDFOR
SET && Opens the Data Session window.
Thanks again!!