Skip to main content
Skip table of contents

Configuration File

Introduction

HTML Compare’s REST API has been designed to take a configuration file along with the inputs to allow users to customize the comparison.

The schema for the configuration file is defined using an XML Schema (XSD), the XSD file is included in the product distribution Samples/Config directory and is documented here: HTML Compare Schema Guide

Editing the Configuration File

To help ensure that you create a valid configuration file, it is recommended that you use an XML editor that supports XSD validation and associate the file with the configuration file XSD. The XSD association is made using the xsi:schemaLocation attribute with a URI value that links to the configuration XSD file html-compare-configuration.xsd, included in the distribution's resources directory. For example:

XML
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="com.deltaxml.htmlcompare.internal.config"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="html-compare-configuration.xsd">
<parameters>
        <comparisonType>
            <characterByCharacter>true</characterByCharacter>
        </comparisonType>
        <tableConfiguration>
            <invalidTableBehaviour mode="propagateUp"/>
            <validationLevel mode="relaxed"/>
            <warningReportMode mode="pis"/>
            <columnKeyingMode mode="auto"/>
            <normalizeTableColumns>true</normalizeTableColumns>
            <ignoreColumnOrder>false</ignoreColumnOrder>
        </tableConfiguration>
        <formattingConfiguration>
            <formattingElements>b, i, u, em, strong, emphasis, dfn, code, sup, small, s, span, basefont, font, bdo, bdi, br, mark, ins, del, ruby, rt, rp, div</formattingElements>
            <ignoreFormattingElements>true</ignoreFormattingElements>
        </formattingConfiguration>
        <mathmlConfiguration>
            <mathmlGranularity mode="adjacent"/>
        </mathmlConfiguration>
        <svgConfiguration>
            <svgEnabled>true</svgEnabled>
            <svgGranularity mode="detailed-adjacent"/>
            <svgZIndexEnabled>true</svgZIndexEnabled>
            <zIndexMarkupStyle>purple</zIndexMarkupStyle>
            <svgFallbackEnabled>false</svgFallbackEnabled>
        </svgConfiguration>
        <htmlConfiguration>
            <inputAMarkupStyle>red</inputAMarkupStyle>
            <inputBMarkupStyle>green</inputBMarkupStyle>
        </htmlConfiguration>
    </parameters>
</configuration>

With this XSD association in your configuration file, your XML editor should provide auto-completion and context-specific help documentation as you type.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.