Really simple XML question
- From: davidlamontadams@xxxxxxxxx (Dave Adams)
- Date: Fri, 31 Mar 2006 09:39:20 -0500
How do I print the value of 'Time Magazine'?
Here is my file (ejournlist.xml):
<?xml version='1.0'?>
<EJOURNLIST>
<EJOURN>
<TI>Africa Confidential</TI>
<ISSUE>Vol. 1, no.1</ISSUE>
<FILEFORMAT>PDFformat</FILEFORMAT>
</EJOURN>
<EJOURN>
<TI>Time Magazine</TI>
<ISSUE>Vol. 1, no.1</ISSUE>
<FILEFORMAT>TXTformat</FILEFORMAT>
</EJOURN>
</EJOURNLIST>
Here is my script:
#!/usr/bin/perl -w
use XML::Simple;
use Data::Dumper;
#create object
my $xml = new XML::Simple;
#read XML file
my $data = $xml->XMLin("ejournlist.xml");
#print output
print Dumper($data);
- Follow-Ups:
- Re: Really simple XML question
- From: Dermot Paikkos
- Re: Really simple XML question
- From: Mr. Shawn H. Corey
- Re: Really simple XML question
- Prev by Date: Re: the only difference is the 'x' after '/g'
- Next by Date: sending email problem....
- Previous by thread: grep file file handle
- Next by thread: Re: Really simple XML question
- Index(es):
Relevant Pages
|