XML Import

[TOC]

Overview

The XML Import feature allows you to import property listings from an XML file following the OS Property XML format. This is commonly used when receiving data from partner systems or third-party providers that export in XML.

The import is processed in batches of 5 listings at a time to prevent server timeouts. The page will automatically advance to the next batch until all listings have been processed — do not close the browser window while an import is in progress.


Before You Begin

Before importing an XML file, verify that the following server requirements are met:

Requirement Description
memory_limit PHP's memory limit must be high enough to parse the full XML file. Increase this value in your PHP configuration if you are importing large files. Setting it to -1 removes the limit entirely.
max_execution_time PHP's maximum script execution time must be sufficient to process all batches. Increase this value or set it to 0 (no limit) for large imports.
cURL The cURL PHP extension must be enabled. cURL is used to download property photos from external URLs referenced in the XML file.

XML File Format

OS Property expects a specific XML structure. A sample XML file is available at: http://osproperty.ext4joomla.com/sample_xml.txt

The top-level structure uses a <listings> element containing one or more <listing> elements, each representing a single property.

Key Field Rules

1. Rent Time Frame (<price_for>)

The value must be one of the following codes:

Code Meaning
OS_NOT_APPLICABLE Not applicable
OS_PER_SQUARE_METRE Per square metre
OS_PER_SQUARE_FEET Per square feet
OS_PER_MONTH Per month
OS_PER_NIGHT Per night
OS_PER_FORTHNIGHT Per fortnight
OS_PER_WEEK Per week

2. Location (<country>, <state>, <city>)

Each location element should contain a numeric ID corresponding to a record in the OS Property location tables. If no matching record exists, the system will attempt to match by name before creating a new location entry. You may use 0 if the ID is unknown.

3. Extra Fields (<field>)

Each extra field element should include:

Attribute Description
id Numeric ID of the extra field. Use 0 if unknown.
fieldname System name of the extra field (no spaces or special characters)
fieldtype Field type: Radio, Checkbox, Text, Textarea, Singleselect, Multipleselect, or Date
value_type Required for Text fields only: 0 = string, 1 = integer, 2 = decimal

Import Process

  1. Navigate to XML Import in the backend.
  2. Optionally, select Publish and Approve properties after importing to make all imported listings immediately live.
  3. Select your XML file and start the import.
  4. The system will process listings in batches of 5. The page refreshes automatically after each batch. Do not close the browser until the process is complete.

Notice: You can choose to automatically publish and approve imported properties before starting the import.