Re: xpat functions and smarty
| From: | Luc Saint-Elie | Date: | Tue, 12 Mar 2002 15:09:39 +0000 |
| Subject: | Re: xpat functions and smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3014@lists.php.net to get a copy of this message | ||
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/