# Miscellaneous

## dllversion()

canlib.kvamemolibxml.dllversion()

  Get the kvaMemoLibXML DLL version number.

  Returns

    `canlib.VersionNumber`

## kvaBufferToXml()

canlib.kvamemolibxml.kvaBufferToXml(conf_lif)

  Convert a buffer containg param.lif to XML settings.

  Scripts from the param.lif will be written to current working directory.

  Parameters

    conf_lif (`str`) – Buffer containing param.lif to convert.

  Returns

    `str` – Buffer containing converted XML settings.

## kvaXmlToBuffer()

canlib.kvamemolibxml.kvaXmlToBuffer(conf_xml)

  Convert XML settings to param.lif buffer.

  Parameters

    conf_xml (`str`) – XML settings to convert.

  Returns

    `str` – Buffer containing converted param.lif.

## kvaXmlToFile()

canlib.kvamemolibxml.kvaXmlToFile(xml_filename, binary_filename)

  Convert XML file to binary configuration file.

  Parameters

    - xml_filename (`str`) – Filename of file containing the XML settings.

    - binary_filename (`str`) – Filename of binary configuration.

## kvaXmlValidate()

canlib.kvamemolibxml.kvaXmlValidate(conf_xml)

  Validate a buffer with XML settings.

  Parameters

    conf_xml (`str`) – string containing the XML settings to validate.

  Returns

    `tuple` – containing

    - `int`: Number of XML validation errors.

    - `int`: Number of XML validation warnings.

## xmlGetLastError()

canlib.kvamemolibxml.xmlGetLastError()

  Get the last error message (if any).

  Returns

    `tuple` – containing

    - `str`: Error message associated with the error code.

    - `Error`: Error code.

  Changed in version 1.19: Returned error code is now an enum.

## xmlGetValidationError()

canlib.kvamemolibxml.xmlGetValidationError()

  Get validation errors (if any).

  Call after kvaXmlValidate() until return status is KvaXmlValidationStatusOK.

  Returns

    `tuple` – containing

    - `int`: Validation error status code.

    - `str`: Validation error status message.

  Changed in version 1.19: Returned status code is now an enum.

## xmlGetValidationStatusCount()

canlib.kvamemolibxml.xmlGetValidationStatusCount()

  Get the number of validation statuses (if any).

  Call after kvaXmlValidate().

  Returns

    `tuple` – containing

    - `int`: Number of XML validation errors.

    - `int`: Number of XML validation warnings.

## xmlGetValidationWarning()

canlib.kvamemolibxml.xmlGetValidationWarning()

  Get validation warnings (if any).

  Call after kvaXmlValidate() until return status is KvaXmlValidationStatusOK.

  Returns

    `tuple` – containing

    - `int`: Validation warning status code.

    - `str`: Validation warning status message.

  Changed in version 1.19: Returned status code is now an enum.