eZ Community » Forums » Developer » Import XML-page?
expandshrink

Import XML-page?

Import XML-page?

Wednesday 26 May 2004 12:20:27 pm - 3 replies

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 happy.gif Emoticon )

Are any functions available?
Any hints?

Modified on Wednesday 26 May 2004 12:21:48 pm by Dirk Bensel

Wednesday 26 May 2004 12:37:23 pm

Look at the sheet extension in contributions.

It does nearly exactly what you want using ez

Modified on Wednesday 26 May 2004 5:31:00 pm by Dominik Pich

Wednesday 26 May 2004 3:29:53 pm

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 happy.gif Emoticon

Regards,

James

Modified on Wednesday 26 May 2004 3:30:25 pm by James Packham

Tuesday 01 June 2004 3:12:56 pm

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 happy.gif Emoticon.
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 happy.gif Emoticon
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 sad.gif Emoticon.
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 sad.gif Emoticon
Any hints????

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from