WP-Property: Importer - Useful XPath Rules To Use In Schedules

XPath is an XML query language. In other words - XPath is used for selecting specific data out of an XML document.

Get All Unique Types

//property[not(type = preceding-sibling::property/type)]//type/uk

Get All Unique Subtypes for a Specific Type

//property[type/uk = "Townhouse"][not(subtype = preceding-sibling::property/subtype)]//subtype/uk

Get All Townhouse Subtypes

//property[type/uk = "Townhouse"]/subtype/uk

Get All Properties by Type: Townhouses

//property[type/uk = "Townhouse"]

Get All Properties by Type: Apartment with over 2 Bedrooms

//property[type/uk = "Apartment"][beds > 2]

Get All Properties by Subtype: Penthouse

//property[subtype/uk = "Penthouse"]

Get Full Objects with Unique Status

//property[not(status = preceding-sibling::property/status)]

Get Unique Beds

//property[not(beds = preceding-sibling::property/beds)]/beds

Get Unique IDs

//property[not(id = preceding-sibling::property/id)]/id

Get All Unique Subtypes

//property[not(subtype = preceding-sibling::property/subtype)]//subtype/uk

Get all images by Type: Apartment

//property[type/uk = "Apartment"]/images//url

DMQL Query

If you are bewildered by XPath semantics you'll learn that DMQL is even stranger. DMQL is a query language required by most RETS providers. The first step you should take before writing a DMQL query is take a look at the fields used by your MLS provider, you may do so at http://rets.usabilitydynamics.com, provided you have login credentials. Once you have logged into your RETS provider navigate to a Property Classification of your choice.

  • Property data is almost always found under the "Property" data type which breaks down further into "Classifications", in this case "REN" classification corresponds to "Rentals" and "RES" corresponds to "Residential". The naming conventions will vary from one providers to the next.

  • The "SystemName" column displays a list of available fields, these are the fields you must use within DMQL queries as well as Attribute Mapping.

Date Ranges

To limit listings to a particular date range, perhaps if we only want to fetch active listings that have been modified after August of 2013, the following query would do just that:


The previous query will import all listings modified after August 1st, you could otherwise limit by a specific range, let's say all of July:

Lastly, if you don't care about fetching Active listings, and only care about the time-frame, your query would be as follows: ```(DATE_MODIFIED=2013-07-01-2013-08-01) ```

We could also restrict our import to the number of photos a listing has - assuming that the provider has a "PHOTO_COUNT" field the following DMQL query will only import listings that have between 2 and 5 photos:


Most MLS providers have a number of fields corresponding with different sections of an address - e.g. "Street Number", "Street Name", "City", etc. To reduce the number of attributes it is recommended to concatenate all the address fields into a single field and let WP-Property handle the geolocation (via Google Maps API) upon import.

So, assuming that your provider uses "STREET_NUM", "STREET_NAME", "CITY", "STATE" and "ZIP" fields, the following Attribute Map entry will easily concatenate (combine) the separate fields into a single "Address" field:

When the listing is imported, WP-Property will perform a "Geolocation Lookup" which will fetch the latitude, longitude, county, etc. fields from Google Maps and save the values into the listing

WP-Property: Importer

  1. Images are not Importing in WP-Property Importer
  2. XML and RETS Setup Services for WP-Property Importer
  3. Properties not published or Pending Images Download for WP-Property Importer
  4. WP-Property: Importer - Home
  5. Error No listings are found when running the WP-Property Importer Check your Query
  6. Could not connect to RETS server HTTP in WP-Property Importer
  7. Could not load XML Object from raw data in WP-Property Importer
  8. RETS DMQL basics for WP-Property Importer
  9. Issues Connecting to RETS Server for WP-Property Importer
  10. New Google Spreadsheet format in WP-Property Importer
  11. Google Spreadsheet errors in WP-Property Importer
  12. WP-Property: Importer - Useful XPath Rules To Use In Schedules
  13. WP-Property: Importer - There Was An Issue Doing The RETS Search In WP-Property Importer
  14. WP-Property: Importer - Translating
  15. Installing WP-Property: Importer
  16. WP-Property: Importer - Running The Import For WP-Property Importer
  17. WP-Property: Importer - Recommended Values For Server Configuration Options For WP-Property Importer
  18. WP-Property: Importer - MySQL Server Has Gone Away
  19. WP-Property-Importer-Introduction To RETS
  20. WP-Property: Importer - Integration Of WP Importer With Agents Add On
  21. WP-Property: Importer - Importing CSV
  22. WP-Property: Importer - Google Spreadsheet Format Error. Authentication With Google Failed. Reason Is Bad Authentication In WP-Property Importer
  23. WP-Property: Importer - DMQL Queries
  24. WP-Property: Importer - Could Not Load XML Object From Raw Data. Looks Like The Data Has Errors And Can Not Be Converted To XML Object In WP-Property Importer
  25. WP-Property: Importer - Could Not Connect To RETS Server, PHRETS 1 Cookie File \"\" Cannot Be Written To. Must Be An Absolute Path And Must Be Writable Within WP-Property Importer
  26. WP-Property: Importer - Basic XML Import Step By Step For WP-Property Importer
  27. WP-Property: Importer - Basic RETS Import Step By Step For WP-Property Importer
  28. WP-Property: Importer - Available XPath Functions For WP Importer Schedules
  29. WP-Property: Importer - Attribute Matches In Schedule Settings For WP-Property Importer
  30. WP-Property: Importer - Advanced Schedule Options For WP-Property Importer

Feedback and Knowledge Base