www.webdeveloper.com
Results 1 to 3 of 3

Thread: exporting Website as XML file

  1. #1
    Join Date
    Feb 2012
    Posts
    7

    exporting Website as XML file

    Hi.

    Short question: I was asked to create an export function for a companies custom-made inhouse CMS. Everything related to the website should be in that XML file (or in those files), no further file or database transfers needed. So I'm just asking for some general advice.

    Currently I'd do it like this:
    Have the export-script create a zip-file that contains the XML files. One XML file for each section of that CMS (such as 'contacts' or 'newsletters'). The one very large section, with all the content of the website, would be split into two parts in that xml file. One for the structure, and one for the content.

    So, in case anyone got some general advice, that would be nice.

  2. #2
    Join Date
    Aug 2006
    Posts
    1,943
    I would think of critical importance would be the spec for what the import requirement would be. Otherwise you could design the export practically any way you want...

  3. #3
    Join Date
    Feb 2012
    Posts
    7
    Quote Originally Posted by tracknut View Post
    I would think of critical importance would be the spec for what the import requirement would be. Otherwise you could design the export practically any way you want...
    Well, the main purpose of this import/export function would be to move complete websites from one version of the CMS to another. So the importer will have to be somewhat modular, so that it can be kept up to date as things change with the CMS, to make sure the old stuff can still be imported correctly.

    Currently I'm wondering, regarding the exporter, what makes more sense:
    1) to structure the exported xml file according to the structure the website has in the cms (the cms organizes everything in folders)
    2) to structure the exported xml file according to the type of content, and simply stating there what belongs where

    Example:
    1)
    Code:
    <site>
     <node>
      <id>1</id>
      <node>
       <id>2</id>
      </node>
     </node>
    <site>
    or 2)
    Code:
    <site>
     <node>
      <id>1</id>
      <parent>0</parent>
     <node>
    
     <node>
      <id>2</id>
      <parent>1</parent>
     <node>
    </site>
    Hm, I guess I'll go for the second version.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles