Search

I am working on a project with Symphony 2 and I would like to be able to somehow group XML output by multiple fields.

The XML generated now is as follows:

<episode-list>
    <section id="13" handle="episode">Episode</section>
    <show link-id="115" link-handle="family-guy">
      <entry id="137">
        <title handle="death-has-a-shadow">Death Has a Shadow</title>
        <season>1</season>
        <episode>1</episode>
      </entry>
      <entry id="129">
        <title handle="blue-harvest">Blue Harvest</title>
        <season>6</season>
        <episode>1</episode>
      </entry>
    </show>
    <show link-id="116" link-handle="lost">
      <entry id="135">
        <title handle="there-s-no-place-like-home">There’s No Place Like Home</title>
        <season>4</season>
        <episode>12</episode>
      </entry>
    </show>
</episode-list>

As you can see I am grouping the episodes by show. However, I would also like to group the episodes by season. Now, I could use XSLT and the Muenchian method, but I think this is too complicated and probably will be too slow. I would rather have the episodes grouped by season in the XML. What would be the best way to do this?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details