GetSimple Support Forum

Full Version: Import pages from an xml file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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,
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 ?
(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.
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.
(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
Generator a auto import from xml, create pages automatic.
(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).
I am looking to create an RSS importer, each item generate a page

Where to start?
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
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
(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.