TemplatePower Forum Forum Index TemplatePower Forum
Ask your question about TemplatePower here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XML

 
Post new topic   Reply to topic    TemplatePower Forum Forum Index -> Feature request/Discussion
View previous topic :: View next topic  
Author Message
jmark



Joined: 02 Jan 2006
Posts: 2

PostPosted: Mon Jan 02, 2006 6:45 pm    Post subject: XML Reply with quote

What About XML?
RSS Feeder. It woul be a good thing to DO. I don't know if it his possible.
I leave the question in the air.
Thanks for the great class.
Laughing Laughing Laughing Laughing Laughing
Back to top
View user's profile Send private message
Ironbye



Joined: 02 Jan 2006
Posts: 3

PostPosted: Tue Jan 03, 2006 4:02 pm    Post subject: Reply with quote

you mean an RSS feed templatepowered?
Back to top
View user's profile Send private message
Donny_nl



Joined: 11 Jan 2006
Posts: 14

PostPosted: Fri Sep 15, 2006 1:20 pm    Post subject: Reply with quote

I always use TemplatePower to generete either XML files or RSS feeds.

For XML which needs to be transported i use a XML template which i fill with the needed values. With getOutputContent() you get the entire output. All you have to do then is write it to a file and there is your XML.

For RSS you can easily use the parser with a template such as this :

Code:
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0">
<channel>
   <title>Sitename</title>
   <docs>http://blogs.law.harvard.edu/tech/rss</docs>
   <link>http://www.site.com/</link>      
   <description>Your own description</description>
   <language>nl-nl</language>   
   <lastBuildDate>{date}</lastBuildDate>
   <copyright>Copyright 2006 site.nl</copyright>
   <!-- START BLOCK : image -->
   <image>
   <title>site.nl RSS Feeds</title>
   <url>http://www.site.nl/images/logo.jpg</url>
   <link>http://www.site.nl/</link>
   <width>128</width>
   <height>128</height>
   </image>
   <!-- END BLOCK : image -->
   <managingEditor>info@site.nl</managingEditor>
   <webMaster>info@site.nl</webMaster>
<!-- START BLOCK : items -->
<item>
   <title>{subject_title}</title>
   <link>{link}</link>
   <description>{post}</description>
   <pubDate>{pubdate}</pubDate>
   <category>{category}</category>
   <author>{author}</author>
   <guid>{link2}</guid>
</item>
<!-- END BLOCK : items -->
</channel>
</rss>


Just fill the vars and print the XML and there's your feed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TemplatePower Forum Forum Index -> Feature request/Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group