OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: REBOL and XML

[ Lists Home | Date Index | Thread Index ]
  • From: "Thomas B. Passin" <tpassin@idsonline.com>
  • To: "Simon St.Laurent" <simonstl@simonstl.com>, "XML-Dev Mailing list" <xml-dev@ic.ac.uk>
  • Date: Fri, 17 Dec 1999 21:36:32 -0500


----- Original Message -----
From: Simon St.Laurent <simonstl@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@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@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)



  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS