Jump to content

Recommended Posts

Posted

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.

Posted

Basically, yes. :)

 

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).

Posted (edited)

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.

 

Edit: Oh, and i'm looking for one thats not event based. :)

Edited by section31
Posted

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? :)

Posted

I'll have to admit that I didn't know what you were talking about when you said:

Oh, and i'm looking for one thats not event based.

Digging around in the PHP documentation, I found a link to a page that explained the difference between event-based and DOM methods for reading XML documents pretty well (see the first 2 paragraphs).

 

My first thought was that if you were wanting to ditch the PEAR class you're using, maybe you could use PHP's XML Parser Functions. 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.

 

Searching again through the PHP documentation, I found PHP's DOM XML Functions. I don't know if you can make use of these, but it looks like they could do what you're looking for.

 

Hope this helps...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...