Validation

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 
)
C#
KvaXmlStatus KvaXmlGetValidationError(out KvaXmlValidationStatus status, out string buf)

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

Parameters
[out]statusValidation status code.
[out]bufBuffer containing the validation error message.
[out]lenSize of the validation message buffer in bytes.
Returns
KvaXmlStatusOK (zero) if success.
KvaXmlStatusERR_XXX (negative) if failure.

◆ kvaXmlGetValidationStatusCount()

KvaXmlStatus kvaXmlGetValidationStatusCount ( int *  countErr,
int *  countWarn 
)
C#
KvaXmlStatus KvaXmlGetValidationStatusCount(out int countErr, out int countWarn)

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

Parameters
[out]countErrNumber of XML validation errors.
[out]countWarnNumber of XML validation warnings.
Returns
KvaXmlStatusOK (zero) if success.
KvaXmlStatusERR_XXX (negative) if failure.

◆ kvaXmlGetValidationText()

KvaXmlStatus kvaXmlGetValidationText ( KvaXmlValidationStatus  status,
char *  buf,
unsigned int  len 
)
C#
KvaXmlStatus KvaXmlGetValidationText(KvaXmlValidationStatus status, out string buf)

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

Parameters
[in]statusKvaXmlValidationStatus error code.
[out]bufBuffer to receive error message.
[in]lenBuffer size in bytes.
Returns
KvaXmlStatusOK (zero) if success.
KvaXmlStatusERR_XXX (negative) if failure.

◆ kvaXmlGetValidationWarning()

KvaXmlStatus kvaXmlGetValidationWarning ( KvaXmlValidationStatus status,
char *  buf,
unsigned int  len 
)
C#
KvaXmlStatus KvaXmlGetValidationWarning(out KvaXmlValidationStatus status, out string buf)

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

Parameters
[out]statusValdiation status code.
[out]bufBuffer containing the validation warning message.
[out]lenSize of the validation message buffer in bytes.
Returns
KvaXmlStatusOK (zero) if success.
KvaXmlStatusERR_XXX (negative) if failure.

◆ kvaXmlGetVersion()

unsigned short kvaXmlGetVersion ( void  )
C#
KvaXmlStatus 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 
)
C#
KvaXmlStatus KvaXmlValidate(string xmlbuf)

Validate a buffer with XML settings

Parameters
[in]xmlbufBuffer containing the XML settings.
[in]xmllenSize of the XML buffer in bytes.
Returns
KvaXmlStatusOK (zero) if success.
KvaXmlStatusERR_XXX (negative) if failure.