Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

HTML thingy

 [1/1] from: brett::codeconscious::com at: 10-Oct-2000 1:20


Hi List, Two scripts to mention. 1) tag-tool.r Newly updated. It converts a rebol tag! to a block! suitable for use with the build-tag function. E.g
>> print build-tag probe import-tag <body bgcolor="red" link="blue">
[body bgcolor "red" link "blue"] <body bgcolor="red" link="blue"> 2) html-tools.r Leveraging off load/markup and tag-tool.r I came up with this rudimentry HTML querying/manipulation scheme. I thought I would post it here because it may be useful for others that want to get a bit of data out of an HTML page or change the odd attribute here or there. It doesn't understand HTML structure though so don't expect too much. Here's an example of what it can do:
>> unique tags/attribute load-html http://www.rebol.com/ 'href
== [[A HREF "http://www.rebol.com"] [A HREF "sitemap.html"] [A HREF solutions.html ] [A HREF "products.html"] [A HREF "technology.... Another example showing HTML manipulation is in the script itself. It occurs to me that with the tag name now seperated out and some tag types identified, one could start building something that interprets HTML structure. But that idea is a little to ambitious for me just now. Rather than filling your inbox I've uploaded these scripts to my site, so you can find them here: http://www.codeconscious.com/rebol/#Rebolscripts Brett. --
>> my-rebol-stuff
== http://www.codeconscious.com/