Hi hackers, since yast2-2.16.57 you can use a new agent for reading and writing XML files from YaST. The SCR path is .anyxml - yes, it is same as the one of previous agent that we had before (it was announced in http://lists.opensuse.org/yast-devel/2007-11/msg00057.html). The old agent was found incapable for parsing more than very simple files and was renamed to .barexml, see bug 366867 for details. The new agent is using Perl XML::Simple library and is able to return whole content of XML file in a tree structure. Usage: Read a file /tmp/in.xml into YCP map: map config = (map)SCR::Read (.anyxml, $[ "file" : "/tmp/in.xml", "args" : $[ "ForceArray" : 0, "KeepRoot" : 1 ] ]); See the attached example XML file and it's YCP representation got as a result of this command. You can see that the call can take some optional arguments, the meaning of those 2 in example is "force nested elements to be represented as arrays even when there is only one" and "retain the root element name". The agent should actually be able to parse most[*] of the options that XML::Simple provides, see http://search.cpan.org/dist/XML-Simple/lib/XML/Simple.pm for more. Writing modified YCP structure back to XML is also easy: SCR::Write (.anyxml, $[ "file" : "/tmp/config.xml", "xml" : config, ]); Find a bit more about usage directly in the agent file: http://svn.opensuse.org/svn/yast/trunk/yast2/library/agents/ag_anyxml Jiri [*] = not tested -- Jiri Suchomel SUSE LINUX, s.r.o. e-mail: jsuchome@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Praha 9, Czech Republic http://www.suse.cz