Quick Question On Xml/rss

windows

Guest
Am I correct in assuming when people want to make an xml document for rss or whatever reason, they just grab the contents from their database and manually start building the xml structure and just echo it out with an xml header or write it to an xml file? I've parsed xml before using some pear class, but I've never made an xml document before and just want to make sure I'm not doing something wrong.<!--content-->
Basically, yes. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> <br /><br />I have RSS/XML feeds on my MT weblog. The templates for these feeds are pretty much as you describe - they lay out XML structure and have MT-specific templates tags in them that tell MT where to insert data and content taken from the database. After the template is processed, the resulting XML page is simply written to a .xml file (which can then be read by an RSS aggregator).<!--content-->
thanks david. Any recommendations on an xml aggregator? The pear class I'm using is bloated? I need a very basic one, it doesn't even need to support attributes.<br /><br />Edit: Oh, and i'm looking for one thats not event based. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Are we talking about the same kind of aggregator? What I mean by RSS aggregator is a client application that reads RSS feeds from multiple weblogs. It sounds to me like you're asking for a light weight XML parser - a library that you can use in your own script to read XML files. Am I understanding correctly? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /><!--content-->
<img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/blush.gif" style="vertical-align:middle" emoid=":blush:" border="0" alt="blush.gif" /> I'm sorry. Yes, I meant server side parser. Not aggregator.<!--content-->
I'll have to admit that I didn't know what you were talking about when you said:<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Oh, and i'm looking for one thats not event based.<!--QuoteEnd--></div><!--QuoteEEnd--><br />Digging around in the PHP documentation, I found a link to a page that explained the <a href="http://www.sitepoint.com/article/php-xml-parsing-rss-1-0/2" target="_blank">difference between event-based and DOM methods</a> for reading XML documents pretty well (see the first 2 paragraphs).<br /><br />My first thought was that if you were wanting to ditch the PEAR class you're using, maybe you could use PHP's <a href="http://www.php.net/manual/en/ref.xml.php" target="_blank">XML Parser Functions</a>. But in reading the PHP documentation and the page I linked above, I realized that PHP's XML parser functions use an event-based parser.<br /><br />Searching again through the PHP documentation, I found PHP's <a href="http://www.php.net/manual/en/ref.domxml.php" target="_blank">DOM XML Functions</a>. I don't know if you can make use of these, but it looks like they could do what you're looking for.<br /><br />Hope this helps...<!--content-->
 
Back
Top