hash

The hash function is used to hash the parameters that are provided

Syntax

c4i:hash(xPath1[, xPath2, ...])

Parameters

You can provide the hash function with the following parameters:

  • A XPath to one or more XML element(s)
    • The string representation of the XML will be hashed
  • The result of the evaluation of a custom function
    • The string representation of a JSON will be hashed
  • Any constant value (string, number, boolean)

Hashing is performed using Java Objects.hashopen in new window function

Ideally, all of the mappings that are used to build the target message should be included in the parameters.

Return value

The hash of the provided parameters

Examples

The following mapping will hash all the attribute values of an object:

- c4i:hash(Values)

The following mapping will hash a single attribute value of an object:

- c4i:hash(Values/Value)

The following mapping will hash the whole of the XML of an object:

- c4i:hash(.)

The following mapping will hash the JSON representation of the attribute values of an object:

- c4i:hash(c4i:serializeValuesToJSON(Values))
Last Updated: