Functions

opcode_kind_from_string (str)

opcode_kind_to_string (kind)

string_escape (str)

Details

Xmlb.opcode_kind_from_string(str)
Parameters:

str (str) – a string, e.g. FUNC

Returns:

a Xmlb.OpcodeKind, e.g. Xmlb.OpcodeKind.TEXT

Return type:

Xmlb.OpcodeKind

Converts a string to an opcode kind.

New in version 0.1.1.

Xmlb.opcode_kind_to_string(kind)
Parameters:

kind (Xmlb.OpcodeKind) – a Xmlb.OpcodeKind, e.g. Xmlb.OpcodeKind.FUNCTION

Returns:

opcode kind, e.g. FUNC

Return type:

str

Converts the opcode kind to a string.

New in version 0.1.1.

Xmlb.string_escape(str)
Parameters:

str (str) – string, e.g. app/org.gnome.ghex/x86_64/stable

Returns:

new string that is safe to use for queries

Return type:

str

Escapes XPath control sequences such as newlines, tabs, and forward slashes.

New in version 0.1.2.