Using XML files to pass product data from a supplier to a WooCommerce store is not always comfortable for the humans involved. Unless you have a proper XML reader or the data file has been specifically structured for human readability, it's a pain to interpret.
So why use XML? Because it has some distinct advantages over simpler formats like CSV. For one, it makes defining relationships much simpler.
WooCommerce product suppliers will seldom use it this way, but that won't stop them. Sooner or later, someone is going to send you an XML product file.
If you perform your product imports manually, it doesn't really matter if your product import plugin can read these files directly because you can just open each file in Excel and immediately save it as a CSV file instead. If this is your workflow, then you should skip this article and read The 5 Best Plugins for WooCommerce Product Import from CSV.
However, if you want to automatically import product XML files, then you'll need a plugin that will read them directly. Unfortunately, only three of the five plugins on our original The 5 Best WooCommerce Product Import Plugins will do this. We'll flag the ones that don't.
Aside from this issue of XML compatibility, the real question when importing product XML files is whether your plugin can handle formatting issues within the data. For example, sometimes you will encounter multiple values within the same XML element (red box):
Note how the color "blue" is separated from the color "red" by a pipe character ("|"). This shouldn't happen in XML, as the product attributes of blue and red should technically be in their own child elements, say, "Color".
The complex data contained within the blue box is even more egregious to XML purists, mainly because it's not truly self-defining. But make no mistake: you will encounter these types of violations within product XML files. The question is, can your plugin handle them?
Let's have a look!
WP All Import is the leading data import plugin in the WordPress/WooCommerce space. WooCommerce product imports are no exception.
The plugin's advantages begin with how it handles images (click to see an expanded picture):
Note how it lets you a) drag the incoming imageurl element into the relevant target field and b) enter the character used to separate the individual images in that field (should the product have multiple images).
When each image is stored in its own element, the plugin lets you consolidate that information, though it is intelligent enough to skip an element if it is empty for a specific product:
WP All Import gives you the same kind of flexibility when importing variable products:
Note how it provides different options to address the six most common ways of handling product variation data. It even gives you a visual sample to compare to your XML structure so you can make the right choice!
These examples capture the underlying design principle of this plugin: you can handle just about anything by dragging and dropping values and clicking predefined options. That's what allows you to complete even moderately complex product imports in only minutes.
What happens if you encounter a situation that can't be handled this way? No problem. WP All Import provides an embedded function editor that you can use to handle pretty much any other data issue imaginable.
For example, let's say that a supplier sends you prices that you want to increase without manually changing the price of every product after the import. In this case, WP All Import lets you create a simple function to adjust the price on the fly:
You can then use this function inside your product import fields:
This combination of powerful tools is why we view WP All Import as the gold standard for handling all possible XML product imports. For more information on this plugin, see Import WooCommerce Products from CSV, XML, or Excel.
This plugin matches WP All Import's XML capabilities in many key areas. For example, it lets you manage most image issues directly through the interface:
It gives you the same level of support for importing product variations. The screens it uses for this are almost identical to those of WP All Import, so we won't show them here, but the two plugins are remarkably similar.
Finally, Woo Import Export also lets you manage custom fields that contain multiple values, often called "serialized fields," directly through the interface:
Using this feature, you can easily break the serialized data into key/value pairs. Note, WP All Import offers a very similar feature — so similar that there's no point in showing it to you.
The main reason why Woo Import Export is not ranked #1 for handling product XML files is that they don't have an embedded function editor to manage issues that can't be handled via the interface. This is especially disappointing since they offer one for their export plugin.
They also can't import all types of WordPress data, including WordPress posts, pages, custom taxonomies, etc.
For additional information, see Woo Import Export.
As with the first two plugins on this list, Webtoffee's Product Import Export for WooCommerce will directly import XML files. The problem is its inability to handle challenging data format issues.
For example, you can use its interface to map product attribute elements to their corresponding fields:
However, if those XML elements don't line up with the product attributes in your store, there's no way to substantially modify them on the fly, i.e., no embedded function editor. All you can do is make minor edits to individual elements.
This is also true for handling custom fields that contain multiple values. Webtoffee itself states: "It is to be noted that the system accepts metadata only in the same formats as it is stored in the database. So the best practice would be to export the data first and then use the exported spreadsheet for importing products. This method will help in reducing the compatibility issues considerably."
What they really mean here is that you have to manually edit your XML data before importing it, which obviously rules out any kind of automation.
The same is true for handling variable products. To map child variations to parents, instead of giving you several interface options to handle the different ways this can be achieved, they state, "In the CSV file, make sure that you use both SKU and Parent_SKU in the CSV for a variation. The child products should always have a Parent_SKU."
They only reference CSV files in this statement, but the same is true for XML imports.
Webtoffee's image handling capabilities are a bit better but still fall short of the approaches used by WP All Import and Woo Import Export.
If it sounds like we're being overly critical of this plugin, that's not our intent. If your XML product data is coming to you formatted the way you need it, this plugin becomes every bit as effective as its predecessors. It's the exceptions that cause it to stumble.
To learn more, see Product Import Export for WooCommerce.
Although this plugin is #4 on our The 5 Best WooCommerce Product Import Plugins list, it cannot import products directly from an XML file, so you have to manually open the file in Excel first and save it as a CSV file instead. Once you do this, you're better off reading The 5 Best Plugins for WooCommerce Product Import from CSV.
To learn more, see Product Importer Deluxe.
Same for this plugin, as it also lacks the ability to import directly from XML files.
When asked which plugin WooCommerce store owners should use to import products in general, we answer like this: if you want to be able to address every possible product import scenario, no matter how complex, choose WP All Import.
The other advantage this gives you is the ability to import all other types of WooCommerce and WordPress data.
If you pair WP All Import with WP All Export, you not only get the same comprehensive coverage on the export side — you can also bulk edit and migrate WooCommerce and WordPress data, often with just a few clicks.
If you don't want WP All Import, you're going to have to compromise. Regarding the import of WooCommerce products from XLM specifically, you'll only have to compromise a little with Woo Import Export but a lot with Webtoffee's Product Import Export for WooCommerce.
Are those compromises acceptable? That's entirely dependent on your needs. The objective of this article is to help you make an informed choice.