This is a diff between 1.1 and 1.2 revisions:

80d92
> ;
>
69a90
< for (declare i int, i := 0; i < l; i := i + 1)
< {
< declare title, link, dt varchar;
< title := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"] ./atom:title/text()', xp[i]);
< dt := cast (xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"] ./atom:published/text()', xp[i]) as varchar);
< link := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"] ./atom:id/text()', xp[i]);
< if (not exists (select 1 from news where n_source = link))
< insert into news (n_date, n_text, n_source, n_title)
< values (dt, xml_cut (xp[i]), link, title);
< commit work;
< }
68d77
> for (declare i int, i := 0; i < l; i := i + 1)
> {
> declare title, link, dt varchar;
> title := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"]
> ./atom:title/text()', xp[i]);
> dt := cast (xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"]
> ./atom:published/text()', xp[i]) as varchar);
> link := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"]
> ./atom:id/text()', xp[i]);
> if (not exists (select 1 from news where n_source = link))
> insert into news (n_date, n_text, n_source, n_title)
> values (dt, xml_cut (xp[i]), link, title);
> commit work;
> }
66a75
< xp := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"] //entry', xt, 0);
< l := length (xp);
65d73
> xp := xpath_eval ('[xmlns:atom="http://www.w3.org/2005/Atom"] //entry', xt,
> 0);
> l := length (xp);
63a71
< cnt := http_client (url);
< xt := xml_tree_doc (cnt);
62d66
> if (isvector (h_ret))
> ctype := http_request_header (h_ret, 'Content-Type', null, null);
> if (ctype is null or ctype not in ('text/xml', 'application/xml',
> 'application/atom+xml'))
> signal ('DEMO0', 'The returned content is not a news feed');
> xt := xml_tree_doc (cnt);
59a64
< declare cnt any;
< declare xt, xp any;
< declare l int;
58d59
> declare cnt any;
> declare xt, xp, h_ret, ctype any;
> declare l int;
>
> ctype := null;
> cnt := http_client_ext (url, n_redirects=>5, headers=>h_ret);