e-invoicing

Compliance Tools Hub

About XML Tools

XML Tools is a module in Compliance Tools Hub that lets you transform, convert, and validate XML files using country-specific XSLT stylesheets and XSD schemas.

The XML Tools module contains four sub-tools for working with SCI and legal XML files:

XML Processor

Upload or paste an XML file, select a transformation direction (inbound Legal-to-SCI or outbound SCI-to-Legal), transform the file, and validate the result against a country-specific XSD schema. Use XML Processor when you need to both transform and validate in sequence.

Conversion

Convert SAP Standard IDOC files or JSON files into XML format. Use Conversion when your source data is not already in XML.

Validation

Validate any legal or SCI XML document against a country-specific XSD schema and review detailed error information, including error number, line, element name, and description. Use Validation when you have an existing XML file you want to check without transforming it first.

Samples

Retrieve legal or SCI XML sample files by country, document type, version, and sample file. Use Samples as a reference when building or testing your own XML documents.

Transform and validate XML with XML Processor

Use the XML Processor to upload SCI or legal XML files, transform them between formats, and validate the results against country-specific XSD schemas.

The XML Processor transforms XML files between SCI and legal formats using country-specific XSLT stylesheets. You can also validate the output against the corresponding XSD schema to confirm that it meets the required structure.

  1. In the left navigation menu, click XML Tools, then click the XML Processor tab.

    The page opens with an input panel on the left and a preview panel on the right.

  2. Select the Country, Doc Type, and Version.
  3. Select the transformation direction:
    • Inbound — Transforms legal XML to SCI format.
    • Outbound — Transforms SCI XML to legal format.
  4. Paste your XML into the input panel, or click Upload XML to upload a file.

    To reset the input panel, click Clear.

  5. Click Transform.

    A "Transformation successful" notification confirms the result. The transformed XML appears in the preview panel on the right.

  6. In the Download result banner, click Copy or Download to save the output.

    The banner shows the source format, target format, and country for your reference.

  7. Optional: To validate the transformed output against the XSD schema, click Validate.

    If validation fails, a Validation Errors popup lists all issues. Each error entry shows the error number, line, element name, and a description of the problem. Use the navigation buttons to jump to each error line in the input panel.

    Fix the errors in your source XML and click Validate again. Repeat until the green "XML is valid according to the XSD schema" banner appears.

  8. Optional: To reset all selections and start a new transformation, click Clear filters.

Convert files to XML

Use the Conversion tool to convert SAP Standard IDOC files or JSON files into XML format.

The Conversion tool converts SAP Standard IDOC files or JSON files into XML format. Use it when your source data is not already in XML and you need to convert it before transforming or validating it in Compliance Tools Hub.

  1. In the left navigation menu, click XML Tools, then click the Conversion tab.

    The page opens with an input panel on the left and a preview panel on the right.

  2. Select the conversion type:
    • IDOC to XML — Converts SAP Standard IDOC files. Each line must follow the structured segment format, for example:
      CODE
      EDI_DC40 TABNAM:EDI_DC40 DIRECT:2
      E1EDKA1 PARVW:AG NAME1:CustomerName
      E1EDKA1 PARVW:WE NAME1:DeliveryAddress
    • JSON to XML — Converts JSON files to XML format.
  3. Paste your content into the input panel, or click Upload file to upload a file.
  4. Click Convert.

    A "Conversion successful" notification confirms the result. The converted XML appears in the preview panel on the right.

  5. In the Download result banner, click Copy or Download to save the result.

Validate XML documents

Use the Validation tool to validate legal or SCI XML documents against country-specific XSD schemas and interpret validation errors.

The Validation tool checks any legal or SCI XML document against the country-specific XSD schema. Use it to confirm that your XML meets the required structure before using it in your implementation or processing it further in Compliance Tools Hub.

  1. In the left navigation menu, click XML Tools, then click the Validation tab.

    The page opens with an Input panel on the left and a Validation result panel on the right.

  2. Select the Country, Doc Type, and Version.
  3. Select the document format: Legal or SCI.
  4. Paste your XML into the input panel, or click Upload XML to upload a file.

    If you upload a file, a "File uploaded" confirmation appears. No confirmation appears when pasting XML directly.

  5. Click Validate XML.

    If the XML is valid, a green "XML is valid according to the XSD schema" message appears in the Validation result panel. In the Download result banner, click Copy or Download to save the result.

    If validation fails, a Validation Errors popup lists each issue with the following details:

    • Error number — The sequence number of the error.

    • Line — The line in the XML where the error occurs. Error lines are highlighted in the input panel.

    • Element name — The XML element that caused the error.

    • Description — An explanation of what is wrong.

    Use the navigation buttons to go to each error line in the input panel. Fix the errors in your XML and click Validate XML again. Repeat until the green success message appears.

  6. Optional: To reset all selections and start a new validation, click Clear filters.

Retrieve XML samples

Use the Samples tool to find and download legal or SCI XML sample files by country, document type, and version.

The Samples tool provides ready-made legal and SCI XML sample files for each supported country. Use these samples as a reference when building or testing your own XML files.

  1. In the left navigation menu, click XML Tools, then click the Samples tab.
  2. Select the Country, Doc Type, and Version.
  3. In the fourth dropdown, select the sample file you want to view.

    Both panels load automatically when you select a sample: the Legal Format panel on the left and the SCI Format panel on the right. Selecting a legal sample automatically loads the corresponding SCI sample. Multiple samples may be available per country and document type.

  4. Click Download XML in the panel for the format you want to save.

    Click Download XML in the Legal Format panel to download the legal sample, or in the SCI Format panel to download the SCI sample. You can download both if needed.

  5. Optional: To reset all selections and start a new search, click Clear filters.

You can use the sample as a reference when building your own XML files, or load it into the XML Processor or Validation tool to test your implementation.