[ic] instant reparse?
Marc Brevoort
interchange-users@icdevgroup.org
Wed Feb 19 06:34:01 2003
Hello group,
The following script shows a problem that I have.
[perl]
$url=$CGI->{myurl};
$params=$CGI->{myparam};
my $page="[set result][posttourl $url $params][/set]";
return $page;
[perl]
After all is generated, this causes interchange to (correctly) fetch a
page from the web that returns some XML. I'd like to parse the XML later
on on the same page, for example
[comment] perl block above before this comment [/comment]
[perl]
my $xml=$Tag->scratch("result");
# I'd like parse XML here
#however, the following returns 'posttourl':
$page=substr($xml,1,9);
return $page;
[/perl]
Obviously, the variable called "result" hasn't been interpreted yet.
I've used 'interpolate=1', '[perl reparse=1]' (in both first and second
perl block) and [strip reparse=1] between the perl blocks, but so far
the webpage is only fetched after it had been needed by my xml handler.
The problem would be solved if a perl block could force an instant
reparse of a string with tags, something like
my $result=$Tag->scratch("result");
my $xml=$Tag->strip( {body=>$result, reparse => 1 } );
# xml parsing goes here
Is there a way to do this?
Thanks in advance,
--
Marc Brevoort
e-mail: marc.brevoort@armazemdedados.com
web: http://www.armazemdedados.com
Armazem de Dados, Informatica, Lda
Dep. Desenvolvimento
Tel. +351 21 910 83 10 / Fax. +351- 21 910 83 19