Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using WW: dbf to XML, post, XML to dbf ?
Message
From
25/04/2001 15:01:39
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00497923
Message ID:
00499779
Views:
47
Welcome back to Minnesota, Hans!

>I'm vague about the posting.

XMLHTTP will work here, try this code:
LOCAL loXML AS MSXML2.XMLHTTP 
loXML = CREATEOBJECT('MSXML2.XMLHTTP')
loXML.open('post', 'http://24.14.98.235/xml.asp', .F.)
loXML.send('<?xml version="1.0"?><userinfo><name>Hans Guttman</name></userinfo>')
?loXML.responseText
On my website is a page called xml.asp that uses no FoxPro code at all, just opens up the parser in an ASP page with code simialar to below, and send it to the client.

>I can't figure out how to convert XML to VFP.

Converting XML to VFP isn't too tricky. You do know the structure of the files, right? Here's some code to start you off, this takes an XML string (lcXML) and gets the username out of it, and puts it into a VFP table, "userinfo"
lcXML = '<?xml version="1.0"?><userinfo><name>Hans Guttman</name></userinfo>'
loXML = createobject("msxml2.domdocument")
loXML.LoadXML(lcXML)
lcName = loXML.documentElement.selectSingleNode('name').text
replace name with lcName in userinfo
Check out the Wiki for Erik Moore's parsing lecture to get more of the details.
Previous
Reply
Map
View

Click here to load this message in the networking platform