XML RDF Viewer

Description: This sample demonstrates how to retrieve and view the contents of RDF files. The Resource Description Framework (RDF) is a framework for describing metadata. RDF uses XML. It is designed

ITPro Today

November 14, 2001

2 Min Read
ITPro Today logo in a gray background | ITPro Today

Description: This sample demonstrates how to retrieve and view the contents of RDF files. The Resource Description Framework (RDF) is a framework for describing metadata. RDF uses XML. It is designed so that Web sites can supply metadata in an easy to use fashion. Using RDF a Web site can create a metadata file that describes the sites content. The file can then be parsed for an understanding of what is on the site.

More Details

The sample is written in Visual Basic 6.0 and consists of a single form. Users can enter the URL of a known RDF file or they can choose buttons that represent RDF files from three different sources. The form then retrieves the RDF file, which is then parsed using the MSXML parser. The contents of the RDF file are presented in a list box and any URL links attached to each item are stored in an array. When an item in the list box is selected, the page represented by the associated URL is displayed in the Browser control.

Browser/Platform Compatibility

This sample requires Internet Explorer 5.0, Visual Basic 6.0, and Windows 98, Windows NT 4.0, or Windows 2000.

Usage

The form has buttons for MacWeek and ExoScience. Choosing MacWeek retrieves news headlines from the URL http://macweek.zdnet.com/macweek.xml. Choosing ExoScience retrieves news headlines from the URL http://exosci.com/exosci.rdf.

An excellent source for finding sites that provide data in XML is http://www.xmltree.com. This site provides searching capabilities and also groups sites by category. Use XMLTree to find a site that provides data in XML and then enter the URL of that site in the form. Note that the extension used on the RDF file may vary. For instance, the URL for Beta News headlines is http://betanews.com/mnn.php3, while the URL for the Motley Fool headlines is http://www.fool.com/about/headlines/rss_headlines.asp.

To run the XML RDF Viewer application, open the Visual Basic Project file (XMLRDFViewer.vpb) with Visual Basic 6.0 and click on 'Start'. Click on either the MacWeek or ExoScience button to display the XML content. Click on any one of the headings to display the web content inside the browser window

Complete Article

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like