Loading...
Searching...
No Matches
Common stuff for XML parsers in Librepo (datatypes, etc.)

## Macros

#define | LR_CB_RET_OK 0
#define | LR_CB_RET_ERR 1

## Typedefs

typedef int(* | LrXmlParserWarningCb) (LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)

## Enumerations

enum | LrXmlParserWarningType { LR_XML_WARNING_UNKNOWNTAG , LR_XML_WARNING_MISSINGATTR , LR_XML_WARNING_UNKNOWNVAL , LR_XML_WARNING_BADATTRVAL , LR_XML_WARNING_MISSINGVAL , LR_XML_WARNING_SENTINEL }

## Detailed Description

## Macro Definition Documentation

## LR_CB_RET_ERR

#define LR_CB_RET_ERR 1

Return value for callbacks signalizing error

Definition at line 34 of file xmlparser.h.

## LR_CB_RET_OK

#define LR_CB_RET_OK 0

Return value for callbacks signalizing success

Definition at line 33 of file xmlparser.h.

## Typedef Documentation

## LrXmlParserWarningCb

typedef int(* LrXmlParserWarningCb) (LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)

Callback for XML parser warnings. All reported warnings are non-fatal, and ignored by default. But if callback return LR_CB_RET_ERR instead of LR_CB_RET_OK then parsing is immediately interrupted.

Parameters

  type | Type of warning
  msg | Warning msg. The message is destroyed after the call. If you want to use the message later, you have to copy it.
  cbdata | User data.
  err | GError **

Returns
  LR_CB_RET_OK (0) or LR_CB_RET_ERR (1) - stops the parsing

Definition at line 57 of file xmlparser.h.

## Enumeration Type Documentation

## LrXmlParserWarningType

enum LrXmlParserWarningType

Type of warnings reported by parsers by the warning callback.

Enumerator
LR_XML_WARNING_UNKNOWNTAG | Unknown tag
LR_XML_WARNING_MISSINGATTR | Missing attribute
LR_XML_WARNING_UNKNOWNVAL | Unknown tag or attribute value
LR_XML_WARNING_BADATTRVAL | Bad attribute value
LR_XML_WARNING_MISSINGVAL | Missing tag value

Definition at line 38 of file xmlparser.h.