From http://paste.tclers.tk/1650
% set ::errorInfo
wrong # args: should be "::htmlparse::2treeCallback tree tag slash param textBehindTheTag"
while executing
"::htmlparse::2treeCallback t {a} {} {class="advanced" href="http://search.mises.org/search?proxycustom=}"
("eval" body line 1193)
invoked from within
"eval "$cmd {$vroot} {} {} \{$html\}""
(procedure "parse" line 96)
invoked from within
"parse -cmd [list ::htmlparse::2treeCallback $tree] $html"
(procedure "::htmlparse::2tree" line 18)
invoked from within
"::htmlparse::2tree $data t"
Here is the code to produce this error:
proc geturl {url} {
if {[catch {http::geturl $url -timeout 30000} tok]} {
puts stderr "Couldn't fetch $url"
} else {
if {[http::status $tok] == "ok"} {
return [http::data $tok]
}
}
http::cleanup $tok
}
package require http
package require struct
package require htmlparse
set url http://mises.org/
set data [geturl $url]
::struct::tree t
::htmlparse::2tree $data t