Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using WW: dbf to XML, post, XML to dbf ?
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00497923
Message ID:
00498331
Views:
20
>>Look at West Wind's wwXML class (http://www.west-wind.com)
>>
>>It will allow you to easily convert DBF to XML and viceversa.
>>
>>XMLtoCursor does indeed create a VFP cursor and conversely CursortoXML creates XML out of your data.
>
>This is true, but I believe that XMLtoCursor requires that the XML be the
>output from CursorToXML. If the XML result you're getting is from any other
>source (which I gather is the case here), then I doubt that it'll work.
>
>I'm tempted to suggest a routine that would interpret the XML results and
>convert that into the format that XMLToCursor expects (or directly to a
>cursor), but since this is the EXACT thing XML is designed to prevent the need
>for, I'm hoping there's a better way.

Well, that's pretty much the name of the game. You need some format that matches. Dynamic figuring out of XML is not going to happen anytime soon. All XML generation schemes I know of work this way at this point (SQL Server, Oracle are a couple of examples).

So, yes you need the same data format, but wwXML is pretty flexible. Cursors have a pretty specific structure (row, fields) so you can point wwXML into the XMLDOM node that refers to the Row level nodex (SelectNodes()) and then wwXML can work off that. So other structures do work, but it's not one command - it's using the DOM to locate the right node, then using ParseXMLToCursor().

FWIW, wwXML works with SQL Server's schema and data format as well as VFP7's.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform