On Oct 16, 2012, at 9:04 AM, emse (via Magnolia Forums) <[email protected]> wrote:
> I am looking at ways to import an XML feed into Magnolia. The XML feed > consists of articles from 2010, approximately 50 articles per year. There are > actually two feeds, one XML feed and one XML detail. The XML feed is the full > list of abstract articles, the XML detail contains only one article but > carries all the information about the article not just the abstract. I need > to import all the XML detail into Magnolia as article data types. > > I have tried the Importer module and it seems to solve most of my problems, > but I am concerned with some issues regarding persistency and > maintainability. I have to found a solution that can operate over, say a 10 > year period. So the amount of articles might grow to around 500-700. I am > thinking about storing the articles in Magnolia's data repository sorted in > folders by year. Repo is hierarchical so ideal structure is balanced tree - folders for years are definitively good idea. Much better then flat storage. > > Another issue is that the client wishes to be able to change the articles > once they have been imported to Magnolia. So, the next time the importer > fetches the XML I do not want a changed article to be overwritten. How do I > avoid that? Multiple different ways: - store date of last executing of importer and exclude all items w/ modification after such date. - add hidden prop to the dialog of the data type so you know when item was open in the dialog by editor and saved and avoid modifying those. - store update date by importer in each item and compare that with the last modification date of the item. > > Also each time the importer fetches the XML, I only want new articles (that > does not exist in Magnolia) to be imported. I do not want any duplicates and > I do not want old articles to be deleted. Can you somehow control this with > the importer? you are in control of the importer … if there is unique id on each article you can easily search for the new one … or if you know creating date of the article and it is after the last time you ran your importer … or … HTH, Jan ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
