Title: Import setting challenges
Last modified: March 13, 2021

---

# Import setting challenges

 *  Resolved [ak2447](https://wordpress.org/support/users/ak2447/)
 * (@ak2447)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/import-setting-challenges/)
 * Hi I have a feed from ICECat. I have 3 options of getting this data. In each 
   option I am stuck.
 * Option 1 my preference:
    ICEcat provides an index XML. In that file, for each
   product, there is a URL pointer to the XML file of each product. For example 
   prod_id:6548799, path(en):[https://data.icecat.biz/export/freexml/EN/73379765.xml](https://data.icecat.biz/export/freexml/EN/73379765.xml)
 * I have tried a bunch of different syntax approaches using XPath to have All Import
   look at the XML but unsuccessfully so far.
 * >This is my preferred option so would appreciate if you could advise if (and 
   how) this can be done.
 * Option 2:
    I manually download the full catalogue file as a csv with “feature
   names as headers”. This relates to the attribute names and values. There are 
   approximately 2000 columns in the file. The header is the attribute name and 
   the rows contain the attribute data. >Can I use the column header as the attribute
   name on the import settings and if so how? >Is there such a way that we can loop
   through all of the columns to avoid the need to reference each column individually?
 * Option 3:
    I manually download the full catalogue file as a csv without “feature
   names as headers”. In this format are approximately 200 columns in the file. 
   The header is labelled feature-nn. The attribute name and attribute data are 
   contained in the row and separated by : . >How can I use XPath or any other option
   to place the value on the left of : to the attribute name and the value on the
   right of : to attribute value?
 * Now I know this looks like 3 questions but really it isn’t. I’d like to use option
   1, but if that isn’t possible then either of option 2 or 3 remains.
 * Thanks.
    Andrew

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/import-setting-challenges/#post-14196723)
 * Hi [@ak2447](https://wordpress.org/support/users/ak2447/),
 * > ICEcat provides an index XML. In that file, for each product, there is a URL
   > pointer to the XML file of each product. For example prod_id:6548799, path(
   > en):[https://data.icecat.biz/export/freexml/EN/73379765.xml](https://data.icecat.biz/export/freexml/EN/73379765.xml)
 * Unfortunately, WP All Import doesn’t have any built-in options to retrieve product
   data from an XML link inside the file being imported. But, you could use custom
   code and our API to do it: [http://www.wpallimport.com/documentation/developers/action-reference/](http://www.wpallimport.com/documentation/developers/action-reference/).
 * > Can I use the column header as the attribute name on the import settings and
   > if so how?
 * You’d have to type in the header name as a static attribute name value.
 * > Is there such a way that we can loop through all of the columns to avoid the
   > need to reference each column individually?
 * I’m afraid that would require custom code and our API as well.
 * > How can I use XPath or any other option to place the value on the left of :
   > to the attribute name and the value on the right of : to attribute value?
 * You can use a custom PHP function to do that: [https://www.wpallimport.com/documentation/developers/custom-code/inline-php/](https://www.wpallimport.com/documentation/developers/custom-code/inline-php/).
   For example:
 *     ```
       function my_get_attribute( $data, $type ) {
       	$data = explode( ':', $data );
   
       	switch ( $type ) {
       		case 'name':
       			return reset( $data );
   
       		case 'value':
       			return array_pop( $data );
   
       		default:
       			return reset( $data );
       	}
       }
       ```
   
 * Example usage:
 *     ```
       [my_get_attribute({attribute[1]},"name")]
       [my_get_attribute({attribute[1]},"value")]
       ```
   
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/import-setting-challenges/#post-14261216)
 * Hi [@ak2447](https://wordpress.org/support/users/ak2447/),
 * I’m marking this as resolved since it’s been inactive for a while. Please open
   up a new topic if you still have questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Import setting challenges’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/import-setting-challenges/#post-14261216)
 * Status: resolved