Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Strip that XML!

by ramrod (Curate)
on Feb 20, 2009 at 20:38 UTC ( [id://745438]=note: print w/replies, xml ) Need Help??


in reply to Strip that XML!

Here's another easy method:
$_ = <<EOF; <xml> <email>toto@foo.com</email><name>Toto</name> <email>tata@bar.com</email><name>Tata</name> <email>tutu@baz.com</email><name>Tutu</name> </xml> EOF my @email = /<email>(.*?)<\/email>/g; my @name = /<name>(.*?)<\/name>/g;
(Note that it leaves XML entities undecoded, as noted in the reply.)

Replies are listed 'Best First'.
Re: Answer: Strip that XML!
by Anonymous Monk on Mar 01, 2009 at 08:19 UTC
    That doesn't decode entities (its broken).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found