Skip to main content
Skip table of contents

Using command line client

This command line client can be used to experiment with the HTML Compare REST server. Please note that the REST server must be running for this code to operate . This client connects to http://localhost:8080 by default, but you can use the property host to customise the host, e.g. -Dhost=http://localhost:1234 to point to the REST service running on a different port to the default of 8080.

This command-line driver was written to demonstrate the use of the HTML Compare REST API, and is not intended as a primary way of interacting with it. Please customise the source code as needed. Currently, it uses asynchronous calls with multipart/form-data. This sample processes responses as Strings and uses XPath to get information from the responses.

Show the product information and usage

Run the jar without any arguments to display product information and usage.

CODE
% java -jar deltaxml-html-rest-client-x.y.z.jar 

HTML Compare REST command-line driver. (C) 2024 Deltaman Group . All rights reserved.

  Usage:
  java -jar deltaxml-html-rest-client-x.y.z.jar
  java -jar -Dhost=http://localhost:1234 -jar deltaxml-html-rest-client-x.y.z.jar
  java -jar deltaxml-html-rest-client-x.y.z.jar compare <inputAFile> <inputBFile> <configFile>[optional] <resultFile>
  
  For more information about how to write the configuration file, visit product documentation at https:docs.deltaxml.com/html-compare/latest/configuration-file

Arguments

Argument

Description

inputAFile

The A file used in the the comparison.

inputBFile

The B file used in the comparison.

configFile

Configuration file used in the comparison. This is an optional argument and client can be used without it using default configuration.

resultFile

The path and name of the file that you would like the result to be written to.

Example

CODE
java -jar deltaxml-html-rest-client-1.0.0.jar compare htmlFile1.html htmlFile2.html output.html

HTML Compare REST command-line driver. (C) 2024 Deltaxml Group. All rights reserved.

  Progress:
  
  QUEUED
  SUBMITTED
  STARTED
  INPUTS_LOADING_A
  INPUTS_LOADING_B
  INPUT_FILTERS
  COMPARISON_RUNNING
  OUTPUT_FILTERS
  SAVING
  FINISHED
  
Result written to output.html

JavaScript errors detected

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

If this problem persists, please contact our support.