redbeard has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (regular expressions)
I have an XML document with multiple repetitive fields all in a single string, as obtained from a web service using LWP::Simple::get.
I would like to parse out those multiple repetitive values (e.g. <email> and <name>) and put them in their own arrays (e.g. @email and @name).
Example document content:
$xml = <<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
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Strip that XML!⭐
by mirod (Canon) on Dec 14, 2000 at 04:46 UTC | |
Re: Strip that XML!⭐
by mirod (Canon) on Dec 14, 2000 at 12:00 UTC | |
Re: Strip that XML!
by myocom (Deacon) on Dec 14, 2000 at 03:55 UTC | |
Re: Strip that XML!
by davorg (Chancellor) on Dec 14, 2000 at 13:57 UTC | |
Re: Strip that XML!
by ruzam (Curate) on Feb 20, 2009 at 21:11 UTC | |
Re: Strip that XML!
by Ovid (Cardinal) on Dec 14, 2000 at 03:53 UTC | |
Re: Strip that XML!
by ramrod (Curate) on Feb 20, 2009 at 20:38 UTC | |
by Anonymous Monk on Mar 01, 2009 at 08:19 UTC | |
Re: Strip that XML!
by perl_addict (Initiate) on Apr 07, 2011 at 06:27 UTC | |
by Anonymous Monk on Apr 07, 2011 at 12:19 UTC |
Back to
Seekers of Perl Wisdom