Xmlb.BuilderSource¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Xmlb.BuilderSource(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Xmlb.BuilderSource
- Return type:
Creates a new builder source.
New in version 0.1.1.
- add_fixup(fixup)¶
- Parameters:
fixup (
Xmlb.BuilderFixup
) – aXmlb.BuilderFixup
Adds a function that will get run on every
Xmlb.BuilderNode
compile creates with this source.New in version 0.1.3.
- load_bytes(bytes, flags)¶
- Parameters:
bytes (
GLib.Bytes
) – aGLib.Bytes
flags (
Xmlb.BuilderSourceFlags
) – someXmlb.BuilderSourceFlags
, e.g.Xmlb.BuilderSourceFlags.LITERAL_TEXT
- Raises:
- Returns:
True
for success- Return type:
Loads XML data and begins to build a
Xmlb.Silo
.New in version 0.1.2.
- load_file(file, flags, cancellable)¶
- Parameters:
flags (
Xmlb.BuilderSourceFlags
) – someXmlb.BuilderSourceFlags
, e.g.Xmlb.BuilderSourceFlags.LITERAL_TEXT
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
True
for success- Return type:
Loads an optionally compressed XML file to build a
Xmlb.Silo
.New in version 0.1.1.
- load_xml(xml, flags)¶
- Parameters:
xml (
str
) – XML dataflags (
Xmlb.BuilderSourceFlags
) – someXmlb.BuilderSourceFlags
, e.g.Xmlb.BuilderSourceFlags.LITERAL_TEXT
- Raises:
- Returns:
True
for success- Return type:
Loads XML data and begins to build a
Xmlb.Silo
.New in version 0.1.1.
- set_info(info)¶
- Parameters:
info (
Xmlb.BuilderNode
orNone
) – aXmlb.BuilderNode
Sets an optional information metadata node on the root node.
New in version 0.1.0.