Feeds: How to import content from multiple xml files
-
16-02-2021 - |
Pregunta
I have around 100 xml files. Each xml file contains a single item.
I have created a feeds importer which is working fine for single xml file.
But I don't know if feeds can work with multiple xml files?
Something like loop on the files and import content from each file?
Is it possible with feeds? As I didn't find anything useful.
Solución
D7
You can import a series of files by using the File upload fetcher and enabling the option "Supply path to file or directory directly" on the fetcher settings.
Steps:
Select the File upload fetcher, enable the option "Supply path to file or directory directly".
Store the XML files to import in the public or private directory. On
Administration > Configuration > Media > File system
(/admin/config/media/file-system) you can see which paths are configured for the public or private file system.On the import form, enter the path to the directory with XML files. If you placed these for example in a folder called "mydir" on the public file system, enter
public://mydir
.
D8
In the D8 version of Feeds you would select the Directory fetcher. The next steps would be similar as for the D7 version of Feeds.