REBOL and XML
Thomas B. Passin
tpassin at idsonline.com
Sat Dec 18 02:32:06 GMT 1999
----- Original Message -----
From: Simon St.Laurent <simonstl at simonstl.com>
> Is anyone doing work using REBOL[1] with XML? The 'everything is data'
> approach of REBOL seems both like a good fit and perhaps a conflict with
> the XML approach. I'm just getting started with this, but if anyone has
> opinions or stories, I'd love to hear them.
>
> [1] - http://www.rebol.com (and yes, it's pronounced like rebel)
>
I've copied this from a post I sent to the Python XML-SIG. It's a small
example of getting an html file and parsing it lightly to extract some
specific data.
<extract>
Actually, REBOL looks very interesting. There isn't enough documentation as
yet so the learning curve is on the steep side. At the risk of being
off-topic (and off-Python), I'm including a REBOL script - my only one- that
retrieves a URL, and extracts a particular section from the html. The
section REBOL[...] is essentially a comment.
-----------------------------------------
REBOL [
Title: "Zone Forecast Extractor"
File: %zone.r
Purpose: {Extract the Virginia Zone Forecast and display it.}
]
zone: read http://iwin.nws.noaa.gov/iwin/va/zone.html
print ""
{parse zone [thru <title> copy result to </title>]
print result}
print "Current Fairfax County Zone Forecast"
fairfax: find zone "Fairfax"
parse fairfax [thru "..." copy forecast to "$$"]
print forecast
</extract>
Notice how easy it is to acquire the html file - it is regarded as a
first-class data type that has content. No includes or imports needed, all
this machinery is built-in. Also notice how easy it was to extract the
content of a tag. This is about all I've done with it, though. It seems
promising.
Tom Passin
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list