How to import XML from folder?

This tutorial describes and explains the additional features that the Exporter addon adds to the WPeMatico’s XML Campaign Type, you can see the previous FAQ from this link.

Import an XML file from a folder

The Exporter addon extends this functionality by allowing you to read XML files hosted in any directory, you can simply type the full path next to the file name and use the “Check data” button to validate it. Great, isn’t it?

Import an xml file from a folder

Import XML files by name format

In addition, the Exporter add-on includes another awesome feature that allows to import XML files based on the file name format.

For this feature you will need to add the full path to the directory where the files are hosted, then, every time the campaign is run, it will fetch the last file in the folder corresponding to the format entered.

IMPORTANT

1- The complete path of the folder where the files are hosted must end in / e.g. /var/www/clients/client1/webXY/web/xml/

2- To read the files numbered in sequence (-1, -2, -3…-10) the character * must be added at the end of the file name format, example: etruel-{$mm}-{$dd}-{$yy}*.xml also, the first file generated (without numbering) is needed for it to work.

3- The files must have the “current” date so that they can be read by WPeMatico.

4- To read files -10 onwards, files from -1 to -9 must exist in the folder where are hosted.

Import xml files by name format

Xml hosted files

XML nodes matching

After checking data of the XML file(s) you must select the XML node corresponding to the properties of the feed items, such as title, content, image, date, etc. If the selected XML node is not unique you should use the Parent Elements in the right column to indicate which parent the selected node belongs to.

Data checked

That’s all, enjoy it 😉