Function

PurpleXmlNodefrom_file

since: 3.0

Declaration [src]

PurpleXmlNode*
purple_xmlnode_from_file (
  const char* dir,
  const char* filename,
  const char* description,
  const char* process
)

Description [src]

Creates a node from a XML File. Calling this on the root node of an XML document will parse the entire document into a tree of nodes, and return the PurpleXmlNode of the root.

Available since: 3.0

Parameters

dir

Type: const char*

The directory where the file is located.

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

Type: const char*

The filename.

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

Type: const char*

A description of the file being parsed. Displayed to the user if the file cannot be read.

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

Type: const char*

The subsystem that is calling purple_xmlnode_from_file. Used as the category for debugging.

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

Return value

Type: PurpleXmlNode

The new node or NULL if an error occurred.

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