Quantcast
Channel: Topic Tag: xml | WordPress.org
Viewing all articles
Browse latest Browse all 3201

cberendes on "[Plugin: Feed Pull] Parsing a Pinboard feed"

$
0
0

I've tried it again with

Xpath to posts: item

No custom namespaces specified

title->post_title
link->guid
description -> post_content

and still "No items in feed" when there should be two.

I rolled my own in PHP5.4 and got the two elements I expected:

$html = "";
$url = "https://feeds.pinboard.in/rss/u:berendes/t:gas_pressure/";
$xml = simplexml_load_file($url);
for($i = 0; $i < 3; $i++){
        $title = $xml->item[$i]->title;
        $link = $xml->item[$i]->link;
        $description = $xml->item[$i]->description;
        $html .= "<a href='$link'><h3>$title</h3></a>";
        $html .= "$description";
}
echo $html;

Viewing all articles
Browse latest Browse all 3201

Latest Images

Trending Articles



Latest Images