[augeas-devel] Adding to_xml call to the public API

David Lutterkort lutter at redhat.com
Fri Mar 4 19:16:14 UTC 2011


On Fri, 2011-03-04 at 17:32 +0100, Raphaël Pinson wrote:
> As I am now pretty happy with the Config::Augeas::Exporter prototype to export
> the Augeas tree to XML, now is the time to write it directly in the API.

Good stuff.

> This patch adds a new aug_to_xml public API call, defined as follows:
> 
>    /* Function: aug_to_xml
>     *
>     * Turn the Augeas tree into a libxml2 xmlNodePtr structure.
>     *
>     * Returns:
>     * 0 on success, or a negative value on failure
>     */
>    int aug_to_xml(augeas *aug, const char *path, xmlNode **xmldoc);

The call should take an additional argument 'unsigned int flags' which
are unused for now; people should just pass 0 for that for now.

David





More information about the augeas-devel mailing list