GetSimple Support Forum
QUESTION Import pages from an xml file - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: QUESTION Import pages from an xml file (/showthread.php?tid=7549)



Import pages from an xml file - Carrara - 2015-09-16

I am looking to develop a real estate portal, want to know if there is already an article or where to start to develop a function.


The function would read a particular xml file with various information automatically generate the page for my site.

I wonder if it is possible, and where to start?

Regards,


RE: Import pages from an xml file - shawn_a - 2015-09-16

What does the xml look like ?
What information do you want to keep ?

Do you want to do this in real time and serve it up, or import to pages ?


RE: Import pages from an xml file - Carrara - 2015-09-16

(2015-09-16, 13:36:41)shawn_a Wrote: What does the xml look like ?
What information do you want to keep ?

Do you want to do this in real time and serve it up, or import to pages ?

Good day,


I will specify a few parameters, patterns ...
Title, content, custom fields.

Not necessarily in real time, but with a single.xml file upload several pages.


RE: Import pages from an xml file - Carrara - 2015-09-16

An example, this link: http://corretor.wc4.com.br/sitemap.xml

I will add the xml file the contents and custom fields, wanted to do a self incrementing pages on a single site.


RE: Import pages from an xml file - DimaYakovlev - 2015-09-17

(2015-09-16, 14:14:35)Carrara Wrote: An example, this link: http://corretor.wc4.com.br/sitemap.xml

I will add the xml file the contents and custom fields, wanted to do a self incrementing pages on a single site.

What problem do you have? Just find and read tutorial how to work with xml.
http://php.net/manual/en/simplexml.examples-basic.php
Or I don't understand your question. Smile


RE: Import pages from an xml file - Carrara - 2015-09-17

Generator a auto import from xml, create pages automatic.


RE: Import pages from an xml file - DimaYakovlev - 2015-09-17

(2015-09-17, 20:57:12)Carrara Wrote: Generator a auto import from xml, create pages automatic.

But each page is xml file. Parse source xml file, create pages xml files and update cache.

If you need more data fields - create custom fields in page xml file and use them with native GetSimple function getPageField($page, $field).


RE: Import pages from an xml file - Carrara - 2015-09-20

I am looking to create an RSS importer, each item generate a page

Where to start?


RE: Import pages from an xml file - shawn_a - 2015-09-20

I think there are some blog plugins that can handle RSS feeds, but I would create my own to generate unique urls and simple save as gs xml page format


RE: Import pages from an xml file - Carrara - 2015-09-20

I tested the blog gs to be based, but with the crontab could not generate the files ... it may not be compatible with the gs 3.7


RE: Import pages from an xml file - DimaYakovlev - 2015-09-21

(2015-09-20, 08:33:41)Carrara Wrote: I tested the blog gs to be based, but with the crontab could not generate the files ... it may not be compatible with the gs 3.7

You do not need GetSimple for this. You can create standalone php script to get data from RSS, parse as you need and create xml files in GetSimple page format.

Or store parsed data as you like and use it then you need and how you need with plugin or from theme.