Rafael, I also have an app where data is exported at the branch office and imported at the headoffice. I use dbf's. Why are you using a XML ? Is there any advantage ?
Regards Ajoy Khaund Neamati Road Near Bhogdoi Bridge Jorhat 785001-21 Assam, India Tel: 91-376-2351288 Cell: 91-94350-92287 Mail: akha...@hotmail.com Mail: akha...@gmail.com "Walking on water and developing software from a specification are easy if both are frozen." - Edward V. Berard, "Life-Cycle Approaches" -------------------------------------------------- From: "Rafael Copquin" <rcopq...@ciudad.com.ar> Sent: Tuesday, February 17, 2009 6:09 PM To: <profoxt...@leafe.com> Subject: Re: VFP, EDI & XML - Oh My... > Hi Kurt > > Sorry for not replying earlier. If I get you correctly, you need to import > an XML file into VFP. > To be quite honest with you, I never used a schema file. But I do send > data > over the web in the manner I showed you in my earlier post. > The process is this: > > The store creates an XMLAdapter object and loads different cursors into it > with the daily sales, cash receipts, stock positions, etc. > Then it sends the resulting xml file through the internet to the head > office. > At the head office they convert this xml file into the contained cursors, > using the XMLAdapter class, as I showed you how. > Then, the program uses those cursors to integrate the data into the main > head office files. > > Now, there are many ways you can send the XML file to the head office: > > ftp > email > webservice > > If all of the above fails, you can simply load the xml file in a pendrive > and have a biker take the device to head office every day. It seems like a > joke, but I actually have one client who does just that, simply because > the > store is in the city, the head office is in the outskirts of the city and > they have a lousy internet connection (it is the IP provider's fault,with > frequent disconnections). So the simple solution, and super effective, is > to > have this guy jump onto his motorbike and speedily deliver the pendrive to > HQ. (one of the delights of living in this country, there is always a > solution available when technology plays against you - (;>) ) > > Regards > > Rafael Copquin > > > ----- Original Message ----- > From: "Kurt Wendt" <kurtwe...@waitex.com> > To: <profoxt...@leafe.com> > Sent: Friday, February 13, 2009 7:00 PM > Subject: RE: VFP, EDI & XML - Oh My... > > >> Hey there Rafael, >> >> Thanks for the input. In between the time I wrote the original message >> for help - and now - I actually got something figured out. I was able to >> pull in 2 database tables into an XML file, and even have those 2 files >> linked via a Set Relation. Then I had found the ".ToCursor" command and >> was able to output the data into cursors. >> >> Now, during my experimentations - I found that if I double-clicked on a >> Schema file (XSD) - MS Visual Studio on my PC here at work automatically >> opened up the Schema file for viewing. So, since this MS VS tool allowed >> me to open up a Schema file - I figured I would see what I else I could >> do. >> >> I had this sample XML file - an EDI Order file - for which I eventually >> need to import into the VFP database system here. Problem is - I did not >> have a Schema file for this XML file. And, since I figured I needed the >> Schema in order for me to import the file into VFP - I opened up the XML >> file in MS VS - and I found I could Export from MS VS a Schema file. >> >> At that point I tried to use this newly created Schema file, along with >> the sample XML file - but, I ended up getting a strange error when the >> .LoadXML command attempted to execute. It claimed that: >> "XML Schema is Too complex"! >> >> When I opened that Schema file up in MS VS - the tree diagram shows it >> as 4 levels deep. Can that be the case - that VFP and the XMLAdapter is >> unable to handle something like 4 levels deep??? >> >> TIA, >> -K- >> >> -----Original Message----- >> From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] >> On Behalf Of Rafael Copquin >> Sent: Friday, February 13, 2009 4:14 PM >> To: profoxt...@leafe.com >> Subject: Re: VFP, EDI & XML - Oh My... >> >> Hi there Kurt >> >> try this: >> >> ** open two tables, put them inside an xml and send the xml away >> >> Clear All >> Close All >> >> Public oXML,cXML >> >> Use clientes In 0 Alias customers >> Use proveed In 0 Alias suppliers >> >> oXML=CreateObject('XMLAdapter') >> oXML.addtableschema('customers') >> oXML.addtableschema('suppliers') >> >> oXML.toXML('cXML') >> Release oXML >> Use in customers >> Use in suppliers >> >> >> ** you now have a property in memory called cXML >> >> ** you can send this property to a receiving computer via Internet >> >> ** at the other side do this >> Public oXML >> oXML=CreateObject('XMLAdapter') >> oXML.loadxml(cXML) >> oXML.tables(1).tocursor(.f.,'curCustomers') >> oXML.tables(2).tocursor(.f.,'curSuppliers') >> >> Select curCustomers >> Browse >> Select curSuppliers >> Browse >> Clear All >> Close All >> >> >> >> >> >> >> ----- Original Message ----- >> From: "Kurt Wendt" <kurtwe...@waitex.com> >> To: <profoxt...@leafe.com> >> Sent: Friday, February 13, 2009 12:10 PM >> Subject: VFP, EDI & XML - Oh My... >> >> >>> Hello there folks, >>> >>> >>> >>> For the past few days I have been trying to wrap my head around this >>> project - which involves exporting and importing of EDI files via the >>> XML format from within VFP. I even looked at a previous discussion >>> thread for help: >>> >> >> [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/609ecc1d740b409babc294a554b63...@compaq ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.