Import XML-page?

Author Message

Dirk Bensel

Wednesday 26 May 2004 3:20:27 am

Hi everbody,

i'd like to import a XML-page like this one from another webserver.


<myentry id="139847">
<mydatum>25.05.2004</mydatum>
<mytitel>TITEL</mytitel>
<myimage>link to an image</myimage>
<mydachzeile>INTRO</mydachzeile>
<mytext>BODY</mytext>
</myentry>

every container includes text and html-tags.
First, i tried to handle this like a RSS-Feed, but it failed ... because it isnt rss. (try and fail :-) )

Are any functions available?
Any hints?

---
ROCK ON
Dirk

Dominik Pich

Wednesday 26 May 2004 3:37:23 am

Look at the sheet extension in contributions.

It does nearly exactly what you want using ez

James Packham

Wednesday 26 May 2004 6:29:53 am

I'm not recommending this approach, but you <i>could</i> write a php script to be run from a cronjob. It could use expat to parse the xml and insert it directly into the ezpublish database. This is probably quite a timeconsuming process and you'd need to review and test it everytime you wanted to upgrade EZ.

Also you get problems like how to check this stuff before it gets published - insert into an approval workflow?

But it's one idea :)

Regards,

James

Radoslaw Walec

Tuesday 01 June 2004 6:12:56 am

Hi, I'm new here (and with eZpublish).
eZpublish is good, nice, I use it for intranet site. As far as good.
Now, I'v got similar problem. I'v got data in external database and I need to put it into eZpublish system. I'd like to feed up with those data one of nodes in my site. I tried to use RSS but I'v got more (than RSS) fields to import.
My database has simple structure: id, name, something1, something2, etc.
I just want to show it in list view and to be able to search it.
The problem is my database has got about 50000 records :).
I can extract data from my database and convert it to xml page.
I can even make a class (with proper template) inside eZpublish and join it with proper node. But don't expect I'll write entire 50000 records with my fingers into eZpublish :)
And more, I need to do such process once a week. My data are processed in completly different "realy commercial :/" system which I can not change for another one.
So I don't have to check content before I publish it.
Would you say that the best way for solving the problem was a functionality similar to RSS feeder but more versatile?
But I don't have one :(.
So, anyway maybe there is a possibility to write quite fast such functionality based on RSS? In other words: should I rewrite RSS, or build a new module, or just create a simple php script for such functionality? I noticed that SINGLE publishing of object (such as article, file etc.) made over 20 new records in 10 tables (mysql), so it wont be just "simple" php script :(
Any hints????

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

eZ debug

Timing: Jan 31 2025 01:36:26
Script start
Timing: Jan 31 2025 01:36:26
Module start 'layout'
Timing: Jan 31 2025 01:36:26
Module start 'content'
Timing: Jan 31 2025 01:36:26
Module end 'content'
Timing: Jan 31 2025 01:36:26
Script end

Main resources:

Total runtime0.0258 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.0078151.1953
Module start 'layout' 0.00610.0035 739.2031220.6563
Module start 'content' 0.00970.0147 959.85941,001.8984
Module end 'content' 0.02440.0014 1,961.757833.9922
Script end 0.0258  1,995.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.6574140.0002
Check MTime0.00114.2281140.0001
Mysql Total
Database connection0.00114.229010.0011
Mysqli_queries0.00249.441530.0008
Looping result0.00000.042410.0000
Template Total0.00104.110.0010
Template load0.00083.215110.0008
Template processing0.00020.816510.0002
Override
Cache load0.00062.275010.0006
General
dbfile0.002610.117780.0003
String conversion0.00000.030440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs