I extracted the exchange logic into a standalone Composer package, arsengoian/commerce-ml, published on Packagist under the Apache-2.0 licence. A parser maps the XML into a tree of node classes — documents, counterparties, representatives, addresses, products, base units, requisite values and commercial information — and an encoder serialises the tree back to CommerceML. Each node has a constructor and a default implementation, and projects can override implementations with their own classes. PHPUnit tests cover parsing and structure, with coverage reports.