XML Validation

Check SFCC import and metadata XML against the bundled B2C Commerce schemas, with every error underlined and listed in Problems

The extension bundles the B2C Commerce XML schemas and a native validator. Import files such as system object metadata, custom objects, site preferences, jobs, services, catalogs, and price books are checked against their schema, and each error is underlined in the editor and listed in Problems

The bundled validator checks SFCC XML against its schema when a file opens and when it is saved. Errors are underlined, listed in Problems and cleared once the fixed file is saved

When files are validated

  • When the extension starts, every XML file of the workspace is validated, form definitions in cartridge/forms included. Folders such as node_modules, .git, .idea, .vscode, out, and dist are skipped
  • When you open an XML file
  • While you type: the unsaved editor text is validated 300 ms after your last edit, and a slower earlier run never overwrites a newer one
  • When a file changes on disk: on save, when a file is created, or after a Git checkout. Deleting a file removes its problems

Problems always matches the text in the editor, so a fix shows before you save it

Which schema applies

Each file is matched to a schema by namespace. A file that contains the target namespace of a bundled schema, such as http://www.demandware.com/xml/impex/metadata/2006-10-31 for metadata.xsd, is validated against that schema. The extension bundles 53 B2C Commerce schemas, for example:

FileSchema
system-objecttype-extensions.xml, custom-objecttype-definitions.xmlmetadata.xsd
Custom object instancescustomobject.xsd
preferences.xmlpreferences.xsd
jobs.xmljobs.xsd
services.xmlservices.xsd
Catalogs, price books, and inventory listscatalog.xsd, pricebook.xsd, inventory.xsd
Content librarieslibrary.xsd
Form definitionsform.xsd

XML that matches no bundled schema is not validated. That includes pipeline files, which have no schema, and job step types, which are declared in steptypes.json

Read a problem

Each problem shows the validator's message without its cvc- code, spans the reported line from its first non-blank character, and names the source intellij-sfcc-xml-validator. Errors and fatal errors show as errors, anything else as a warning

Hover an underline to read the message in place, or use Problems to move through every XML error of the workspace. The validator offers no quick fixes

Validate a folder

Right-click a folder in the Explorer and choose B2C - Validate XML Files to validate every XML file in it, form definitions included. A notification shows Validating B2C XML Files with the progress and can be cancelled. When the run ends, Problems opens

For AI agents

SFCC MCP gives your AI agent the same schemas and validator. intellijsfcc.xml.schema.contract returns the exact element names, order, required attributes, and allowed values before an edit, and intellijsfcc.xml.validate validates the result against the schema. Its contentSource field says what was checked: unsaved-editor for the open editor text with unsaved changes, disk for the saved file, or inline for a snippet the agent passed, which gets a well-formedness check only

Access and platforms

XML validation needs Intellij SFCC access through a trial, a personal subscription, or an organization seat. Without it, the validator stops and its problems are cleared

The validator ships for macOS on Apple silicon and Intel, Linux x64, and Windows x64. Windows on ARM runs the x64 build under emulation

On this page