1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
%% Copyright (C) 2005 Tycho Softworks.
%%
%% This file is free software; as a special exception the author gives
%% unlimited permission to copy and/or distribute it, with or without
%% modifications, as long as this notice is preserved.
%%
%% This program is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
%% implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% This is xml support script definitions
use url
macro xml-parse
keywords from goto query
define %convert:96 %cookies:96 %path:96 %goto="_main_" %query=""
const %temp "tmp:url-" %session.index
if !defined %from
then
error "xml-missing"
return
endif
writepath %path %temp extension={.xml}
if !defined %session.cookies
then
const %cfile "tmp:url-" %session.index {.dat}
writepath %cookies %cfile
const %session.cookies %cookies
erase %cfile
endif
urlprotocol %from http https ftp
error "xml-invalid"
return
@url:protocol-missing
string %url size=512
url %url url.prefix / %from
libexec limit=$url.limit lib::url_fetch.sh %url \
%path %session.cookies %query
parsexml %path %goto
return
@url:protocol-http
@url:protocol-https
@url:protocol-ftp
const %url %from
libexec limit=$url.limit lib::url_fetch.sh %url \
%path %session.cookies %query
parsexml %path %goto
return
|