Quote from: "ino-news"
there are a number of leads i looked up in the 'net. once i'm finished
with the parsing, i need to cook up the "multipart/form-data"
content-type for the PUT method.
(i meant "POST" there.)
there are two promising lisp html-parsers out there:
(which is a stklos port of the former). htmlprag is a bunch of
functions: a tokenizer generates a function which delivers the next tag
on successive invocations, and there is a structure parser and a HTML
emitter. the structure comes out as:
Code Select
(html->shtml
"<html><head><title></title><title>whatever</title></head><body>
<a href="url">link</a><p align=center><ul compact style="aa">
<p>BLah<!-- comment <comment> --> <i> italic <b> bold <tt> ened</i>
still < bold </b></body><P> But not done yet...")
=>
(*TOP* (html (head (title) (title "whatever"))
(body "n"
(a (@ (href "url")) "link")
(p (@ (align "center"))
(ul (@ (compact) (style "aa")) "n"))
(p "BLah"
(*COMMENT* " comment <comment> ")
" "
(i " italic " (b " bold " (tt " ened")))
"n"
"still < bold "))
(p " But not done yet...")))
then there's a file named "html4each.scm" in the famous slib:
allows installing the slib, look at this file. it scans HTML calling
a user-supplied procedure with a tag-string as its sole argument.
since the guile scheme interpreter is quite user-friendly and the slib
was present as well, i did my program in guile instead of newlisp. it
took about three days until it was alpha ready, just like the newlisp
program before. seems to be standard ... --clemens