Functions
Validation
kvaMemoLibXML

## Functions
KvaXmlStatus | kvaXmlValidate (const char *xmlbuf, unsigned int xmllen)
KvaXmlStatus | kvaXmlGetValidationStatusCount (int *countErr, int *countWarn)
KvaXmlStatus | kvaXmlGetValidationError (KvaXmlValidationStatus *status, char *buf, unsigned int len)
KvaXmlStatus | kvaXmlGetValidationWarning (KvaXmlValidationStatus *status, char *buf, unsigned int len)
KvaXmlStatus | kvaXmlGetValidationText (KvaXmlValidationStatus status, char *buf, unsigned int len)
unsigned short | kvaXmlGetVersion (void)

## Detailed Description

## Function Documentation

## ◆ kvaXmlGetValidationError()

KvaXmlStatus kvaXmlGetValidationError | ( | KvaXmlValidationStatus * | status,
|  | char * | buf,
|  | unsigned int | len
| ) |  |

Get the validation errors (if any). Call after kvaXmlValidate() until KvaXmlValidationStatusOK

Parameters

  [out] | status | Valdiation status code.
  [out] | buf | Buffer containing the validation error message.
  [out] | len | Size of the validation message buffer in bytes.

Returns
  KvaXmlStatusOK (zero) if success.
  KvaXmlStatusERR_XXX (negative) if failure.

## ◆ kvaXmlGetValidationStatusCount()

KvaXmlStatus kvaXmlGetValidationStatusCount | ( | int * | countErr,
|  | int * | countWarn
| ) |  |

Get the number of validation statuses (if any). Call after kvaXmlValidate()

Parameters

  [out] | countWarn | Number of XML valditation errors.
  [out] | countErr | Number of XML validation warnings.

Returns
  KvaXmlStatusOK (zero) if success.
  KvaXmlStatusERR_XXX (negative) if failure.

## ◆ kvaXmlGetValidationText()

KvaXmlStatus kvaXmlGetValidationText | ( | KvaXmlValidationStatus | status,
|  | char * | buf,
|  | unsigned int | len
| ) |  |

Get a human readable description of validation error with supplied error code.

Parameters

  [in] | status | KvaXmlValidationStatus error code.
  [out] | buf | Buffer to receive error message.
  [in] | len | Buffer size in bytes.

Returns
  KvaXmlStatusOK (zero) if success.
  KvaXmlStatusERR_XXX (negative) if failure.

## ◆ kvaXmlGetValidationWarning()

KvaXmlStatus kvaXmlGetValidationWarning | ( | KvaXmlValidationStatus * | status,
|  | char * | buf,
|  | unsigned int | len
| ) |  |

Get the validation warnings (if any). Call after kvaXmlValidate() until KvaXmlValidationStatusOK

Parameters

  [out] | status | Valdiation status code.
  [out] | buf | Buffer containing the validation warning message.
  [out] | len | Size of the validation message buffer in bytes.

Returns
  KvaXmlStatusOK (zero) if success.
  KvaXmlStatusERR_XXX (negative) if failure.

## ◆ kvaXmlGetVersion()

unsigned short kvaXmlGetVersion | ( | void |  | ) |

Return the version of the kvaMemoLibXML DLL. The most significant byte is the major version number and the least significant byte is the minor version number.

Returns
  Version of the kvaMemoLibXML DLL.

## ◆ kvaXmlValidate()

KvaXmlStatus kvaXmlValidate | ( | const char * | xmlbuf,
|  | unsigned int | xmllen
| ) |  |

Validate a buffer with XML settings

Parameters

  [in] | xmlbuf | Buffer containing the XML settings.
  [in] | xmllen | Size of the XML buffer in bytes.

Returns
  KvaXmlStatusOK (zero) if success.
  KvaXmlStatusERR_XXX (negative) if failure.