Re: xpat functions and smarty
| From: | Ron Dyck | Date: | Tue, 12 Mar 2002 18:56:04 +0000 |
| Subject: | Re: xpat functions and smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3016@lists.php.net to get a copy of this message | ||
This class seems to work fine. Thanks!!
Have another question regarding downloading rss files.
I use lynx with this command: "lynx -source http://slashdot.org/slashdot.rdf
> filename" to download the files ahead of time. This is run as a cron job.
Problem is, this works fine on all other rdf files
(http://linuxpower.org/linuxpower.rdf,
http://www.newsforge.com/newsforge.rdf etc. )
except slashdot. There I get
binary data??
I can type http://slashdot.org/slashdot.rdf in my
browser and copy the file
without problems, but can't run lynx on it.
Any thoughts?
ron
----- Original Message -----
From: "Luc Saint-Elie" <luc@saint-elie.com>
To: <smarty@lists.ispi.net>
Sent: Tuesday, March 12, 2002 10:09 AM
Subject: [smarty] Re: xpat functions and smarty
> Ron,
>
> I perhaps misunderstand your question but I don't really understand where
> the difficulty is. As far as Smarty is concerned the data source is of no
> importance (db, XML ...)
>
> I parse RSS documents with PEAR:XML_RSS and generic XML documents with
> xpathclass.php and display them with Smarty without any problem.
>
> For example for the RSS feed :
>
> /***************************************************/
> /* Partner syndication management */
> /***************************************************/
>
> require_once "XML_RSS/RSS.php";
> $rss =& new
> XML_RSS("http://www.myrsspartener.com/hisfile.php");
> $rss->parse();
> $items = $rss->getItems();
> $smarty->assign('items', $items);
>
>
>
> xpathclass.php is at :
> http://sourceforge.net/projects/phpxpath/
> XML_RSS is part of PEAR (pear.php.net)
>
> Luc
>
>
> At 09:33 12/03/02 -0500, Ron Dyck wrote:
> >I've been attempting to use expat functions to parse rdf documents in
> >Smarty. My xml code is working fine until I try to use it in Smarty.
> >
> >I include a file using "include_php" with my xml calls and I suddenly
> >loose the 'key' of a key=>value pair of my data.
> >
> >Anyone done any work with this?
> >
> >=======================
> > Ron Dyck
> > WebbTech
> > <http://www.webbtech.net>www.webbtech.net
> > <mailto:rhd@webbtech.net>rhd@webbtech.net
> > 905 734-1164
> >---
> >You are currently subscribed to smarty as: luc@saint-elie.com
> >To unsubscribe send a blank email to $subst('Email.Unsub')
> >Visit Smarty's homepage at
> >http://www.phpinsider.com/php/code/Smarty/
>
>
> ---
> You are currently subscribed to smarty as: adam@webbtech.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
>