For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2006 > perl XML::Simple parsing for keyword









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perl XML::Simple parsing for keyword
Sonika Sachdeva

2006-03-29, 6:58 pm

Hi,
I want to search for one or more "filename.mpg" from the xml files which I
am parsing using XML:Simple.
It may or maynot be there.

sub parsexml {

my $xml=shift;
my $config = XMLin($xml,keyattr=>[Name]);


my $A = $config->{' X '}->{'Y'}->{'A'} ;
my $B = $config->{'X'}->{'Y'}->{'B'} ;
my $C = $config->{'X'}->{'Y'}->{'C'} ;
my $D = $config->{'X'}->{'Y'}->{'D'} ;

# Search for filename.mpg - all from the file

}

Please suggest.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com