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.
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 is used in augtool to provide a print-xml function, which works in a
similar way to the print function.
Activating the SPAN flag (or calling augtool with --span) adds 'file' nodes to
the XML tree when span knows of a filename associated with the node.
I am planning to write aug_from_xml soon, to import the exported XML back into
the Augeas tree.
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel