Feeds with Xpath Parser won't import images using image URL in XML file Importing images into a multi-valued image field using image URLs from an XML file is not working for me. The Xpath Parser debug output shows the multiple image URLs being parsed correctly, but the images don't get imported. No problem with other ordinary fields.

The XML structure is:

&lt;units&gt;
  &lt;unit&gt;
    &lt;unit_details&gt;
      &lt;images&gt;
        &lt;image&gt;
          &lt;uri&gt;
             http://www.example.com/files/content/villa-102-1.jpg
          &lt;/uri&gt;
        &lt;/image&gt;
        &lt;image&gt;
          &lt;uri&gt;
             http://www.example.com/files/content/villa-102-2.jpg
          &lt;/uri&gt;
        &lt;/image&gt;
      &lt;/images&gt;
    &lt;/unit_details&gt;
  &lt;/unit&gt;
&lt;/units&gt;


The context is: //unit

The Xpath query for the image field is: unit_details/images/image/uri

I played around with the image grabber module for feeds, but it failed also - doesn't seem suited to this task.


Is it possible to import images using the image URL from the XML
file? 
Is it possible to import multiple images into a multi-valued image field?


I'm using Feeds version 6.x-1.0-beta12+18-dev, and Feeds Xpath Parser version 6.x-1.12



UPDATE:

I was able to import images using the CSV importer and the image URL, so this appears to be a problem with Xpath Parser.



UPDATE 2:

I'm seeing no errors in the dblog or the server log.  That patch is for D7. The images do not show up in the node display, but the other fields do. 

Looks like the "enclosure" error gets thrown if the local file name isn't in the right form, but I just have an external URL.  As I mentioned above, the image with the same URL does get imported using the CSV parser, so it doesn't appear to be a problem with the Feeds module, just the Xpath Parser.

The relevant code in D6 (FeedsParser.inc) is: 

    /**
       * @return
       *   A path pointing to a file containing the resource referenced by the
       *   enclosure. This method downloads the resource if it is not local. The
       *   file path must be considered temporary and is only valid for the current
       *   page load.
       *
       * @todo Get file extension from mime_type.
       * @todo This is not concurrency safe.
       */
      public function getFile() {
        if (empty($this-&gt;file) &amp;&amp; $this-&gt;getValue()) {
          // Check if this enclosure contains a local file.
          if (!parse_url($this-&gt;getValue(), PHP_URL_SCHEME)) {
            if (file_check_location($this-&gt;getValue(), file_directory_path()) || file_check_location($this-&gt;getValue(), file_directory_temp())) {
              if (file_exists($this-&gt;getValue())) {
                $this-&gt;file = $this-&gt;getValue();
                return $this-&gt;file;
              }
            }
            throw new Exception(t('Invalid enclosure %enclosure', array('%enclosure' =&gt; $this-&gt;getValue())));
          }
          $filename = basename($this-&gt;getValue());
          if (module_exists('transliteration')) {
            require_once drupal_get_path('module', 'transliteration') . '/transliteration.inc';
            $filename = transliteration_clean_filename($filename);
          }
          $dest = file_destination(file_directory_temp() .'/'. $filename, FILE_EXISTS_RENAME);
          if (ini_get('allow_url_fopen')) {
            $this-&gt;file = copy($this-&gt;getValue(), $dest) ? $dest : 0;
          }
          else {
            $this-&gt;file = file_save_data($this-&gt;getContent(), $dest);
          }
          if ($this-&gt;file === 0) {
            throw new Exception(t('Cannot write content to %dest', array('%dest' =&gt; $dest)));
          }
          $this-&gt;delete_file = TRUE;
        }
        return $this-&gt;file;
      }

}
yes it's possible. 
Feeds is buggy sometimes. 


Try this patch:
http://drupal.org/node/1482530

Can you give more information about what isn't working? What errors are produced etc.