Blog

How to convert an XML product feed to CSV

Convert an XML product feed to CSV, choose a sensible row structure, and check variants, prices, and special characters before importing it.

Megan FosterTools and utilities 5 min read

If a store, supplier, or marketplace needs your product data as a CSV file, you can convert the XML feed in your browser. The key is to check how products and their variants become rows, then verify important fields before you import the result.

Use a CSV with one row per product if each product has a single set of details. If products have separate variants, such as sizes or colors with their own SKUs, the destination system may expect one row per variant instead.

Convert the XML feed to CSV

  1. Open Data Converter and load the XML product feed from your device. The file is processed in your browser and is not uploaded.
  2. Choose CSV as the output format. If the feed contains several product sections, check that the conversion is using the product records, not a header or category section.
  3. Review the converted data before saving it. Check whether the columns represent the fields you need, such as product ID, title, price, stock, and SKU.
  4. Save the result as a CSV file. Keep the original XML unchanged so you can repeat the conversion if you need to adjust the output.
  5. Open the CSV in the system that will import it, or inspect it in a spreadsheet. Confirm that the first row contains the expected column names and that products appear as separate records.

XML stores information in nested elements, while CSV stores information in a flat grid. A product feed might put a product's title and price inside a product element, and put multiple variant elements inside that product. The conversion has to arrange those nested details into columns and rows, so the first result may need checking before it is ready for an import.

Choose a row for each product or variant

Use one row per product

This layout is suitable when each product has one price, one SKU, and no separately managed options. For example, a product with a name, product ID, price, and quantity can usually fit in one row. The destination importer must expect those fields at the product level.

Use one row per variant

If a product comes in multiple sizes or colors, each variant may have its own SKU, price, stock count, or barcode. Many importers need one row for each variant so they can update each option individually. In that layout, the product name or parent ID may appear on several rows, once for each variant.

Check the destination system's import instructions before choosing. The same XML feed can produce a CSV that looks reasonable but still fail if the importer expects a different row structure or column names. A CSV cannot represent a list of child variants inside one cell as separate records unless the importer specifically supports that format.

Check the fields before importing

  • Product and variant IDs. Make sure every record has the identifier the importer uses. If an ID or SKU starts with zero, confirm the zeros remain in the saved CSV. Spreadsheet programs may interpret number-like values as numbers and remove leading zeros.
  • Prices and currency. Check decimal places and currency fields. A value such as 12.50 should not be changed to 12.5 if the importer requires a specific format. Some feeds keep the currency in a separate element.
  • Stock and availability. Check that quantities are attached to the correct product or variant. Confirm whether the feed uses a number, a label such as in stock, or another value.
  • Names and descriptions. Look for missing text, unexpected blank fields, or content from the wrong nested section. Some feeds use different names for similar data, such as a product title and a variant title.
  • Special characters. Review accented letters, apostrophes, quotation marks, and commas in names or descriptions. A comma inside a CSV field should not shift the text into an extra column.

Compare a few records in the CSV with the same products in the original feed. Include a simple product, one with a long description, and one with multiple variants. This quick sample can reveal missing values or a row layout that does not match what the importer expects.

Fix common conversion problems

Several products appear in one row

This can happen when the feed has repeated product elements nested under another section. Check whether the converter has treated a parent element as the record, or whether the destination system expects a different layout. If the result does not separate individual products into rows, it may not be suitable for that import as-is.

Variant fields are missing or hard to match

Look for variant-specific identifiers and values in the XML, not only at the main product level. A parent product's title and a variant's SKU may live in different nested elements. Make sure each row keeps the parent product identity with the correct variant information.

Text appears in the wrong columns

Check fields that contain commas, quotation marks, or line breaks. CSV uses separators to divide columns and quotes to keep certain text together. If the file looks correct in one program but wrong in the importer, check whether the importer expects comma-separated values and the same text encoding.

The importer rejects the CSV

Compare the column names and required fields with the importer's template. Some systems require exact headings, a particular order, or a specific value for availability. Conversion changes the file format, but it does not automatically make the data match every store's rules.

Keep the original feed and the converted CSV until the import succeeds. Since Data Converter works on files in your browser, the product feed stays on your device during conversion.