eZ Community » Forums » Extensions » xml-syntax for ezxmlinstaller
expandshrink

xml-syntax for ezxmlinstaller

xml-syntax for ezxmlinstaller

Friday 07 June 2013 9:02:18 pm - 2 replies

Hi all,

 

I have created a module/view xmlexport/content/[nodeId] in order to export content to xml. Binary data export etc. works fine. Importing of binary data and content is working apart from ezoption arguments. A problem though remains I cannot find an answer for, which is that the node-hierarchy is not preserved. I have no real clue how to use the internal-reference from ezxmlinstaller. I have attached the syntax. Could somebody be so kind an give an advice on what to change?

<eZXMLImporter data_source="extension/ezxmlinstaller/data">
  <CreateContent parentNode="108">
    <ContentObject parentNode="108" contentClass="folder" section="1" remoteID="FOLDER_4a79c6ee923c7e782e5e69052d55df5b" objectID="158" owner="14" creator="14" sort_field="1" sort_order="1">
      <Attributes>
        <name>SubFolder</name>
        <short_name/>
        <short_description>
          <section/>
        </short_description>
        <description>
          <section/>
        </description>
        <show_children>1</show_children>
        <tags/>
      </Attributes>
      <SetReference attribute="node_id" value="188"/>
    </ContentObject>
    <ContentObject parentNode="internal:188" contentClass="folder" section="1" remoteID="FOLDER_ce07bb78c34640a88d97795b3e338c87" objectID="159" owner="14" creator="14" sort_field="1" sort_order="1">
      <Attributes>
        <name>SubSubFolder</name>
        <short_name/>
        <short_description>
          <section/>
        </short_description>
        <description>
          <section/>
        </description>
        <show_children>1</show_children>
        <tags/>
      </Attributes>
      <SetReference attribute="node_id" value="189"/>
    </ContentObject>
  </CreateContent>
</eZXMLImporter>

Best wishes from Bamako/Mali

Sebastian

Modified on Friday 07 June 2013 9:07:02 pm by Sebastian Schoeller

Saturday 08 June 2013 1:53:52 pm

ok I think I found a solution

1. exported strings need to be formatted via wash() first in order to avoid trouble

2. the node hierarchy can either be preserved by calling <CreateContent> and setting the proper node or by calling <Childs> in order to descend within the hierarchy

Tuesday 11 June 2013 1:56:23 pm

Hi all,

I made a fork of ezxmlinstaller and added a module for content export (https://github.com/schoeller/ezxmlinstaller). A first export/import test showed that files and node-hierarchy are well exported and that xmltext is preserved as well. Still though I have trouble for supporting the following datatypes

  • ezpage
  • ezobjectrelations
  • ezbinarfile

If someone would take the time to review and consult me I'd be more than glad. Finishing off these pieces would allow for preserving roles, classes and content to be exported into a repository at the same time and thus for easy environment setup via a repository.

Best wishes from Bamako

Sebastian

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from