My whole project got too messy so I decided to use an existing XML file to load 
in all the needed input I would require.

I have the following code but fail to access to data in $workspace.

my $workspace = XMLin($ARGV[0], forcearray => 1);
print Dumper($workspace);
print "$workspace->{TextHere}->{content}->[0]\n";

The last print gives an error. The output from dumper is similar to this:

$VAR1 = {
'TextHere' => [
                                       {
                         'content' => 'C:\\Data\\asd\\asd\\2008\\ghjk',
                         'xml:space' => 'text'
                       }
                     ]
};

All of the work I was previously doing is listed in here, I just avoided 
extracting it as I knew it would be hard, I am still very green in Perl :)

Can someone point out the syntax to access content (I need that path) as I want 
to use this variable elsewhere.

Thanks!
jlc

Reply via email to