Question

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.

Was it helpful?

Solution

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:

  1. Select the File upload fetcher, enable the option "Supply path to file or directory directly". Supply path to directory

  2. 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.

  3. 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.

Public file system public file system

Import form import form

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top