Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How do I retrieve an element from Atom Feed?

Avatar of Purdue_Pete
Purdue_Pete asked on
Programming Languages-OtherPerlXML
19 Comments1 Solution655 ViewsLast Modified:

I have an atom feed containing the following:
<feed idx:index="no">
<source gr:stream-id="feed/http://www.plantphysiol.org/rss/current.xml">

<title type="html">Plant Physiology current issue</title>
<link rel="alternate" href="http://www.plantphysiol.org" type="text/html"/>

... represents other fields ignored.

I am using Perl, XML::Feed which in turn automatically decides whether to use XML::Atom::Feed or XML::RSS depending on which type of feed. In the above case, it is XML::Atom::Feed.

How do I get the 'source' element & sub-elements in the above xml? I looked at the documentation etc. and seemed like $entry->get($ns, $element) needs to be used for the same.
However, I have been running into lot of minor problems.

Any suggestions on how I can do this starting from a given feed, parse an entry and retrieve all the elements & sub-elements of 'source' will be appreciated.

Avatar of Adam314
This problem has been solved!
Unlock 1 Answer and 19 Comments.
See Answers