XML Output of EZ content - A Method

XML Output of EZ content - A Method

Wednesday 30 May 2007 7:06:00 am - 5 replies

Author Message

STEVO +

Wednesday 30 May 2007 12:31:57 pm

on the contrary, getting xml output from ez is easy.

bruce morrison's written about it here:
http://suffandnonsense.blogspot.com/2007/05/easy-web-services-with-ez-publish.html

i've been using the ezxmldesign extension here:
http://zev.ez.no/svn/extensions/ezxmldesign/trunk/extension/ezxmldesign/

just add a siteaccess which uses the 'xml' design in the extension to output stuff like:

<?xml version="1.0" encoding="utf-8"?>
<ez:content xmlns:ez="http://ez.no/ez" xmlns:ez="http://ez.no/ez"
            xmlns="http://ez.no/">
  <ez:node xmlns:ez="http://ez.no/ez" view="full">
    <ez:name xmlns:ez="http://ez.no/ez">Home</ez:name>
    <ez:attribute xmlns:ez="http://ez.no/ez" name="ezstring"
                  identifier="name"
                  classidentifier="folder">
      <ez:text xmlns:ez="http://ez.no/ez">Home</ez:text>
    </ez:attribute>
    <ez:attribute xmlns:ez="http://ez.no/ez" name="ezboolean"
                  identifier="show_children"
                  classidentifier="folder">
      <ez:boolean xmlns:ez="http://ez.no/ez">Yes</ez:boolean>

    </ez:attribute>
  </ez:node>
</ez:content>

then you can override the templates to your heart's content.

Paul Wilson

Wednesday 30 May 2007 6:12:07 pm

Excellent! Thanks Stevo.

That looks great. I'd only spotted old and incompleted methods when I searched the forums.

Paul Wilson

Thursday 14 June 2007 12:02:28 am

A follow-up note for fellow EZ travellers.

I've been learning more about EZ's nifty features and benefits... I've now figured out how to do all of this using ez's php modules, includes and related code. It still takes some working out, but it does not make any sense to do this the way I first suggested. The EZ code takes all of the hard work out of it. Can be done with 5-10 lines of code instead of 40 or 50.

Softriva .com

Tuesday 26 June 2007 9:02:09 am

Paul,

Can you post your code?

I need to generate xml data for an ajax timeline to read. http://simile.mit.edu/timeline/

http://ez.no/community/forum/setup_design/javascript_timeline_xml_and_ez_publish

I am really stuck. Andre from eZ crew tried to help me and I thank him but I am still not sure how to do it.

OOzy

Paul Wilson

Tuesday 26 June 2007 5:53:42 pm

Hi Oozy,

This code is a bit long ... will send to you rather than posting. It is for simile timeline and produces the XML files required. I've created custom EZ object classes for the timeline components. Still a work in progress. I'd planned to turn this into an EZ extension.

Regards

- Paul

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.