YaST2 Developers Documentation: XML

XML

modules/XML.ycp
XML routines

This module has an unstable interface.

Global Functions

global xmlCreateDoc (symbol doc, map docSettings) -> void

define a new doc type with custom settings, if not defined, global settings will be used.

Parameters:
doc
docSettings
global YCPToXMLFile (symbol docType, map contents, string outputPath) -> boolean

YCPToXMLFile() Write YCP data into formated XML file

Parameters:
docType
contents a map with YCP data
outputPath the path of the XML file
Return value:
true on sucess
global XMLToYCPFile (string xmlFile) -> map<string, any>

Read XML file into YCP

Parameters:
xmlFile XML file name to read
Return value:
Map with YCP data
global XMLError () -> string

The error string from the xml parser. It should be used when the agent did not return content. A reset happens before a new XML parsing starts.

Return value:
parser error