[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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/
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.