Skip to content

VFP: Fetch XML feed

Interpreting XML Feed in Visual Foxpro

Looking for ways to interpret XML files I stumbled on this article at the forum. This was still way too difficult in my opinion. So I used the methods and created some lean code that does what I want in far less code.

This piece of program retrieves a feed from the Dutch public-services network and lists all items:

lcFeed = []
lcFile = UrlToFile(lcFeed)

oItems = oXML.getElementsByTagName([item])
FOR EACH oItem IN oItems
 FOR EACH oLine IN oItem.childNodes
  ? oLine.nodeName+[: ]+oLine.text

Leave a Reply

Your email address will not be published. Required fields are marked *