BBC BASIC for Windows
Programming >> Libraries >> New XMLLIB library
http://bb4w.conforums.com/index.cgi?board=libraries&action=display&num=1247417544
New XMLLIB library
Post by admin on Jul 12th, 2009, 4:52pm
I have developed a new library, XMLLIB:
http://groups.yahoo.com/group/bb4w/files/Libraries/XMLLIB.BBC
This is a simple XML file parser, suitable for tasks such as extracting data from an RSS feed. It is based on a PHP version which I found, but has been considerably enhanced compared with the original.
The PHP original is Object Oriented and I've tried to retain as much of the OOP structure as is practical in BBC BASIC, therefore XMLLIB may be of particular interest to those interested in OOP (and may horrify those who aren't!).
XMLLIB is not intended to be a fully-fledged XML parser; for that you should consider using Microsoft's MSXML COM interface.
I've written three programs to illustrate the use of the library; all require you to download XMLLIB.BBC to your BB4W LIB folder first:
http://groups.yahoo.com/group/bb4w/files/Graphics/banner_array_rss.bbc
This is yet another version of the banner program; this time it uses *genuine* RSS news feeds from the BBC - no cheating!
http://groups.yahoo.com/group/bb4w/files/Miscellaneous/xmllist.bbc
This program displays an XML file with tag colouring and automatic indentation (for demo purposes it uses the BBC newsfeed as its source).
http://groups.yahoo.com/group/bb4w/files/WindowsAPI/xml2tree.bbc
This program displays the hierarchy of an XML file as a tree view, and allows you to display the text content by clicking on a node (again it uses the BBC RSS file as a demo).
Richard.