|
|
|
|
|
|
|
|
|
|
|
|
|
|
INTERNET TECHNOLOGIES
Parsing XML with LotusScript and Microsoft's XML object
By Mark Lawson
These days, XML is a hot topic and, almost daily, people are finding interesting new ways to apply the technology. It seems, however, that as soon as you want to experiment with this format you find yourself steered firmly towards Java.
I wanted to use LotusScript, if possible, to include some XML headline channels on our Web site. This article, while not intended as an in-depth tutorial on XML (Extensible Markup Language) or XSL (Extensible Stylesheet Language), shows how, with some LotusScript and the free Microsoft XML object (MSXML), you can download, parse, and format XML documents easily, either by tree-walking or using XSL patterns in a style-sheet.
XML headline structure Headline files are published as channels for inclusion in 'personalized' sites such as My.Netscape or My.Userland and typically contain news items with a link to the full story. You can, however, get the files themselves; a great starting point for exploring XML since most of them use the same de-facto format, Netscape's RDF. Here is a partial example from a recent DominoPower XML file (these are updated daily):
As you can see, headlines have the typical XML tree structure; just think "categorized view". A Notes view can be formed from the root (rdf:RDF in this case) and each twisty can be formed from a child node which, in turn, can contain other twisties/child nodes and so on. At the end of each branch is the column value. Given this format, what I needed was an agent that could download this sort of file every few hours, parse out the headlines, and create an HTML table I could insert into our site. First, though, I needed MSXML on my machine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by December 31 to save $350. |
|
|
|
|
|
|
|
|
|
|