How to parse a XML feed and to display the data on my custom page?

arnoldc - April 30, 2009 - 19:03

What are my options to parse external XML feeds and to display the extracted data on my own custom page?

Example XML: http://w3schools.com/xml/simple.xml

Is this something that can be done using CCK/View? I did a quick search but couldn't find a concrete answer.

A bit more information about

cheshireinatree - April 30, 2009 - 19:38

A bit more information about what exactly your looking to do would be helpful, but yes, there are a number of xml tools available.

FeedAPI is my parser of choice - http://drupal.org/project/feedapi

Feed Element Mapper is a useful addition - http://drupal.org/project/feedapi_mapper

Aggregation module is also being actively maintained but, at least the last time I checked, was not as robust and is more geared to standard rss feeds. - http://drupal.org/project/aggregation.

If this isn't the direction you're going, reply with a few more details.

'Would you tell me, please, which way I ought to go from here?'
'That depends a good deal on where you want to get to,' said the Cat.
'I don't much care where--' said Alice.
'Then it doesn't matter which way you go,' said the Cat.
--Alice in Wonderla

Thanks for referring to such

arnoldc - May 1, 2009 - 19:44

Thanks for referring to such wonderful module. It looks very powerful and flexible like CCK/Views and naturally, it takes time to learn, especially documentation is on the thin side as with most open-source modules.

My question is that it works fine with standard RSS/Atom feeds, but not regular XML files like the one I showed earlier. http://w3schools.com/xml/simple.xml

I haven't digged SimplePie parser yet but look like they all only take standard RSS/Atom feeds, not regular XML files.... I need a regular XML parser, am I missing something important here.

_

WorldFallz - May 3, 2009 - 00:51

I haven't tried it yet, but maybe the http://drupal.org/project/querypath module?

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Thanks WorldFallz, Just

arnoldc - May 5, 2009 - 21:54

Thanks WorldFallz,

Just installed the module and tried the sample feeds, look like a good library module. It should address my immediated need by writing my own feed module based on this. In the long term, hopefully, someone would create a custom parser plugin for FeedAPI.

_

WorldFallz - May 6, 2009 - 14:10

Looks like the work has already started: http://drupal.org/project/feedapi_eparser. Looks promising.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

 
 

Drupal is a registered trademark of Dries Buytaert.