Skip to main content
Version: 2026.0

xmlUtility

This class provides utility methods for XML validation within JDito. It can be extended to use XML manipulation in the future.

Methods

createXmlValidationConfig

createXmlValidationConfig(): XmlValidationConfig

Creates a new XmlValidationConfig object. The object can be used to validate a XML-file against a XSD (schema).

Returns

The newly created XmlValidationConfig object.


validateXml

validateXml(pXmlValidationConfig): any

Validates a XML against a XSD

Parameters

pXmlValidationConfig

The configuration object containing all the data required for the validation

Returns

any

An object with the details of the validation result. It contains the following properties:

  • isValid: boolean - If the XML is valid

  • message: string - Summary of the validation errors, empty when there are none

  • validationErrors: object[] - Array containing the individual validation error object with these properties:

    • message: string - Description of the error

    • lineNumber: number - Line where the error was found

    • columnNumber: number - Column where the error was found

Throws

AditoException

Throws

SAXNotSupportedException

Throws

SAXNotRecognizedException