load_from_bytes


Description:

[ Version ( since = "0.14.0" ) ]
public bool load_from_bytes (Context context, FormatKind format, Bytes bytes) throws Error

Load metadata for this component from an XML string.

You normally do not want to use this method directly and instead use the more convenient API of Metadata to create and update components.

If this function returns true, a valid component is returned unless the selected format was as_format_kind_desktop_entry, in which case a component ID will have to be set explicitly by the caller in order to make the component valid.

Parameters:

this

an Component instance.

context

an Context instance.

format

the format of the data to load, e.g. as_format_kind_xml

bytes

the data to load.

Returns:

true on success.




2022 vala-language.org