Tue Sep 29 07:07:34 PDT 2009
a/b/hk/accts_subscription
HKPwdPreReq
a/b/hk/accts_forms
HKPwdPreReq
a/b/hk/custtradingpage
BasicPrereq
a/b/hk/accts_userinfo
HKPwdPreReq
a/b/hk/headermain
a/b/hk/custservicepage
a/b/hk/accts_transfermoney
HKPwdPreReq
a/b/hk/userprereq
a/b/hk/indices_us
a/b/hk/homeloggedmessage
a/b/hk/lead
a/b/hk/orderviewmin
a/b/hk/accts_changelogin
SessionPreReq
a/b/intl/quotesandresearch
a/b/intl/intltablesubnavviewcomponent
a/b/intl/intltablemetaviewcomponent
a/b/intl/disclaimer
a/b/intl/headermain
a/b/intl/indices_us
a/b/intl/lead
a/b/intl/selectlanguage
a/b/intl/get-screen
BasicPrereq
a/b/intl/page_f
a/b/intl/basicprereq
a/b/intl/page
BasicPrereq
####
sub AFXMLtoEM {
print "Slurping $AFXML....";
my $TWIG = new XML::Twig ( twig_handlers => {'appDeploymentFile' => \&parseURL} );
#my $TWIG = new XML::Twig ( twig_handlers => {'appDeploymentFile/application' => \&parseURL} );
$TWIG -> parsefile ($AFXML) or die "Can't open $AFXML\n" ;
$TWIG->flush;
# Now we want to change every value from the XML name to an EM instance identifier
#print Dumper(\%AFURLS); exit 1;
while ((my $K, my $ITEM) = each %AFURLS) {
my ($G1,$G2,$APP,$INST) = split /\./,$ITEM,4;
unless ($APP eq "") {
$ITEM = "prd:" . $APP . ":web:" . $INST;
} #Cheesy kludge - fiox when Durai confirms
$AFURLS{$K} = $ITEM;
}
print scalar keys %AFURLS, " records slurped in.\n";
}
sub parseURL {
my ($T, $ADEP) = @_;
my $NAME = $ADEP->att('name');
for my $URLI ($ADEP->first_child('application')->children('urlInfo')) {
#for my $URLI ($ADEP->children('urlInfo')) {
# leading slash added for matching SM filters
$AFURLS{ "/" . $URLI->first_child('url')->text() } = $NAME;
}
#$ADEP->flush;
}