NewsML Import

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

NewsML Import

Author: Andy Gardner

1. Introduction

This guide will show you how to use and adjust the NewsML content importer.

*You must have PHP 5 or later.  Only those versions support SimpleXML, which is required for this script to operate.

2. Components

The importer has very few components, making it fairly easy to use.  A breakdown of the components follows.

3. NewsML Configuration file

This is the file that tells the script where your CMS is, where to put the content in the CMS, what metadata and configuration set to use, your CMS login, an multiple sets of log files and XML import directories.  The old images folder specifies where your image links are looking for their images, and the new images folder specifies what directory in the CMS the images are located.

4. NewsML Configuration Data Definition

This is the data definition used to generate the configuration page.

5. NewsML Data Definition

This is the data definition for a NewsML page.  The importer assigns values to these fields based on the matching node in the XML file.

5. The script

The script displays a list of all the XML directories specified in the config file.  All you have to do is click on one, and it will begin importing that directory's contents (including contents of subfolders).  Make sure there isn't too much content though--PHP's default timeout is 15 minutes.  If it does timeout on you, though, you can check the log file to see which files were imported.

  1. newsml.zip
    This zip file contains the necessary scripts and XML.
  2. newsml.php
    This is the main PHP script that processes the NewsML files.
  3. newsml-config.xml
    This is an example XML config file.
  4. newsml-config-data-def.xml
    This is a data definition to visually configure the XML config file.
  5. newsml-log.log
    This is an example log file.
Last modified on Mon, 30 Oct 2006 12:47:37 -0500

Top / Up / Table of Contents