J
Jordy Keighan
I am trying to compose a URI with some values that I get
from parsing a XML string.
If I print $user_array[0] ===> value = 'bob'
but if I us it in URI->new( ... $user_array[0] ... ) the program
hangs.
If I manualy put 'bob' in $user_array[0]
all is good and the URI->new( ... $user_array[0] ... ) statement
works.
Wy can't I use the string I got from my XML parsing ???
Here is my code:
my $user_string = "";
my $parser = XML:OM:arser->new();
my $doc = $parser->parse($xml);
foreach my $key ($doc->getElementsByTagName('credentials')){
$user_string = $user_string . $key->getAttribute('name') .
" ";
}
@user_array = split(" ", $user_string);
print $user_array[0]; # VALUE OK prints bob!!!!
my $uri = URI->new("https://" . $ENV{HTTP_HOST} .
/cgi-bin/dacs/dacs_group.cgi?OPERATION=LIST_GROUP_MEMBERSHIP&MEMBER_NAME="
.. $ENV{DACS_ACS_JURISDICTION} . ":" . $user_array[0].
"&JURISDICTION=CUBEWERX&DACS_VERSION=1.2&FORMAT=xml"); # STATEMENT
HANGS !!!!
Please help.
Jordy
...
from parsing a XML string.
If I print $user_array[0] ===> value = 'bob'
but if I us it in URI->new( ... $user_array[0] ... ) the program
hangs.
If I manualy put 'bob' in $user_array[0]
all is good and the URI->new( ... $user_array[0] ... ) statement
works.
Wy can't I use the string I got from my XML parsing ???
Here is my code:
my $user_string = "";
my $parser = XML:OM:arser->new();
my $doc = $parser->parse($xml);
foreach my $key ($doc->getElementsByTagName('credentials')){
$user_string = $user_string . $key->getAttribute('name') .
" ";
}
@user_array = split(" ", $user_string);
print $user_array[0]; # VALUE OK prints bob!!!!
my $uri = URI->new("https://" . $ENV{HTTP_HOST} .
/cgi-bin/dacs/dacs_group.cgi?OPERATION=LIST_GROUP_MEMBERSHIP&MEMBER_NAME="
.. $ENV{DACS_ACS_JURISDICTION} . ":" . $user_array[0].
"&JURISDICTION=CUBEWERX&DACS_VERSION=1.2&FORMAT=xml"); # STATEMENT
HANGS !!!!
Please help.
Jordy
...