[ic] How to include HTTP GET response in an IC page

Jon Jensen jon at endpoint.com
Wed Jul 26 13:07:22 EDT 2006


On Wed, 26 Jul 2006, DB wrote:

> The tag works if I use it like this:
> [get-url "http://example.com/mypage.xml"]
>
> and if I view the source of the resulting page I see:
>
> <?xml version="1.0" encoding="utf-8"?>
> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.com">
>  <string>the_result</string>
>  <string xsi:nil="true" />
> </ArrayOfString>
>
> as expected. However if I try
>
> [calcn]
> 	my $page = $Tag->get_url('http://www.example.com/mypage.xml');
> 	$page =~ m!<string>(.+?)</string>!;
> 	$1;
> [/calcn]
>
> then all I see is 0

What's in your error.log?

It may be that the get_url tag code does something un-Safe and thus can't 
be run from a calc block. You may need to write a usertag instead.

Jon

-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/


More information about the interchange-users mailing list