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: [email protected] [mailto:[email protected]]
On Behalf Of Rafael Copquin
Sent: Friday, February 13, 2009 4:14 PM
To: [email protected]
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" <[email protected]>
To: <[email protected]>
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: [email protected]
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/289ea162f5642645b5cf64d624c66a14048e6...@us-ny-mail-002.waitex.net
** 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.

Reply via email to