Function

GioDBusNodeInfonew_for_xml

since: 2.26

Declaration [src]

GDBusNodeInfo*
g_dbus_node_info_new_for_xml (
  const gchar* xml_data,
  GError** error
)

Description [src]

Parses xml_data and returns a GDBusNodeInfo representing the data.

The introspection XML must contain exactly one top-level <node> element.

Note that this routine is using a [GMarkup][glib-Simple-XML-Subset-Parser.description]-based parser that only accepts a subset of valid XML documents.

Available since: 2.26

Parameters

xml_data

Type: const gchar*

Valid D-Bus introspection XML.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the function if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: GDBusNodeInfo

A GDBusNodeInfo structure or NULL if error is set. Free with g_dbus_node_info_unref().

The caller of the function takes ownership of the data, and is responsible for freeing it.