Manual import of a supplier XML feed into 1C-Bitrix becomes a nightmare when the catalog has tens of thousands of items. Mapping errors, duplicates, lost stock — sound familiar? We are a team of certified Bitrix developers with 5+ years of experience and over 50 successful integrations — we automate this process turnkey. Our supplier XML feed parsing for 1C-Bitrix integration ensures automatic product synchronization with 99% mapping accuracy. For example, with 50,000 items, manual import takes 2-3 days, while automated parsing takes 15 minutes. Typical setup costs from $399 and saves $500 per month in employee time — that's $6,000 per year.
What is a supplier XML feed and why is it better than Excel?
An XML feed is a structured file with up-to-date product data: prices, stock, descriptions, attributes. Unlike an Excel price list, XML is predictable: it has a schema and can be parsed reliably with minimal errors. But "predictable" doesn't mean "standard" — each supplier invents their own XML format.
| Format | Features | Memory | Parsing Speed |
|---|---|---|---|
| Flat | All items at one level | Low | High |
| Hierarchical | Nested categories | Medium | Medium |
| Namespaced | Prefixes like g:id |
High | Low (requires namespace handling) |
Choosing a parser for large XML feeds
For files up to 50 MB, SimpleXML is sufficient. It loads the entire document into memory, providing maximum speed. For feeds with hundreds of thousands of items (e.g., 500,000 positions), SimpleXML consumes over 1 GB of RAM — XMLReader processes streams and uses 10x less memory. Example of XMLReader usage:
$reader = new XMLReader(); $reader->open($filePath); while ($reader->read()) { if ($reader->nodeType === XMLReader::ELEMENT && $reader->name === 'offer') { $node = new SimpleXMLElement($reader->readOuterXml()); // process one item } } Proper parser selection reduces server load by 70% and saves up to 70% processing time. XMLReader is the standard choice for catalogs of 100,000+ items.
How to map feed attributes to infoblock properties?
Many suppliers store attributes as a list of <param> elements with a name attribute. Extract into an array:
$params = []; foreach ($offer->param as $param) { $name = (string)$param['name']; $value = (string)$param; $params[$name] = $value; } Then save to the infoblock via CIBlockElement::SetPropertyValueCode. For list properties, create a list element beforehand if it doesn't exist.
Integration workflow
- Analysis — examine the XML structure, identify features, agree on mapping.
- Design — choose parser, storage architecture (infoblocks / HL-blocks).
- Development — write the parser, configure mapping, error handling.
- Testing — load a test feed, verify data correctness and performance.
- Deployment — set up cron, logging, error notifications.
Implementation details: configurable mapping and error handling
Suppliers often change the XML structure without notice. We develop the parser with configurable mapping in a YAML file — adapting only requires changing settings, not code. Logging all errors and notifications via Telegram or email ensure no issue goes unnoticed.
What's included in the result
- XML feed analysis and consultation
- Parser development accounting for all features
- Mapping into Bitrix infoblocks
- Scheduled synchronization setup
- Testing and bug fixing
- Documentation and admin instructions
- Warranty support after launch
| Option | Scope | Typical timeline |
|---|---|---|
| Single supplier, simple XML | Parser + price/stock update | from 2 days |
| Complex XML with parameters | Mapping attributes to infoblock properties | from 4 days |
| Multi-supplier system | Configurable mappings, UI for settings | from 7 days |
Timeline and cost are assessed individually after feed analysis. Get a consultation — we'll send a standard work plan and estimate effort.
Common parsing mistakes and how to avoid them
A common issue: the supplier changes attributes without notice. Solution: configurable mapping via YAML file or separate class to adapt without redeployment. Another mistake is ignoring encoding: XML is UTF-8, but the site may be CP1251. We convert strings immediately upon reading.
Benefits of incremental synchronization
Full reload is simpler, but with 50,000+ items it takes hours. Incremental sync updates only changed rows based on hash or modified field. We recommend incremental approach for catalogs updated more than once a day: it reduces server load and sync window time.
Case study: we processed a supplier feed with 150,000 items and 30 parameters each. Used XMLReader, mapping via XPath. Load time: 15 minutes vs 3 hours for full reload. According to 1C-Bitrix documentation, "for large volumes of data, it is recommended to use the streaming XMLReader parser."
Set up cron:
0 */3 * * * /usr/bin/php /home/bitrix/www/local/cron/supplier_xml_import.php Prices and stock every 2-4 hours, descriptions once daily. After each run — detailed log with update counts and errors; on failure — notification to admin.
Want to forget about manual price list uploads? Contact us — we will analyze your XML and offer the optimal solution within 1 day. Get a consultation: we will assess the complexity and propose a solution for your budget.







