You are here:  » I'm trying to parse this feed...


I'm trying to parse this feed...

Submitted by murph on Tue, 2006-10-10 10:44 in

I can't get this to parse...http://www.homerecordingconnection.com/xml.php?f=rt&n=10

Using:

MagicParser_parse("http://www.homerecordingconnection.com/xml.php?f=rt&n=10","myRecordHandler2","xml|rdf/channel/item/");

What am i doing wrong?

Submitted by support on Tue, 2006-10-10 11:02

Hi,

The format string you are using is not quite correct for that feed. It should be:

xml|rdf:rdf/item/

I just tested that with an example:

View Output

Here's the source:

<?php
  
require("MagicParser.php");
  function 
myRecordHandler($item)
  {
    
print_r($item);
  }
  
$url "http://www.homerecordingconnection.com/xml.php?f=rt&n=10";
  
MagicParser_parse($url,"myRecordHandler","xml|rdf:rdf/item/");
?>

Cheers!
David.

Submitted by murph on Tue, 2006-10-10 11:34

Yes of course, cheers!