Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

andye Re: Pasring XML into a simple hash

by andye (Curate)
on Jun 21, 2001 at 15:47 UTC ( [id://90333]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while ($text =~  m|<jobnumber>(.*?)</jobnumber>.*?<location>(.*?)</loc
    +ation>|sg) {
            print "Found job number $1 in location $2 \n";
    }
    
  2. or download this
    my $regexp = '<post>';
    $regexp .= "(?=.*?<$_>(.*?)</$_>)" foreach qw(jobnumber location);
    ...
    while ($stuff =~ m|$regexp|sog) {
            print "Found job number $1 in location $2 \n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://90333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found