Author: jsuchome
Date: Fri Aug 8 10:33:06 2008
New Revision: 49855
URL: http://svn.opensuse.org/viewcvs/yast?rev=49855&view=rev
Log:
- anyxml agent documentation added to anyxml.scr (bnc#405291)
Modified:
trunk/yast2/library/agents/anyxml.scr
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/library/agents/anyxml.scr
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/agents/anyxml.scr?rev=49855&r1=49854&r2=49855&view=diff
==============================================================================
--- trunk/yast2/library/agents/anyxml.scr (original)
+++ trunk/yast2/library/agents/anyxml.scr Fri Aug 8 10:33:06 2008
@@ -1,13 +1,66 @@
/**
* File: anyxml.scr
*
- * Summary: Agent for reading any XML files.
+ * Summary: Agent for reading and writing simple XML files.
+
+ * Description: Agent is using Perl XML::Simple library.
+ * Write access is supported, but check the limitations
+ * at XML-Simple page (e.g. order of elements is lost in the
+ * maps)
*
* Authors: Jiri Suchomel
*
- * Example: SCR::Read (.anyxml, "/root/some_file.xml")
+ * See: http://search.cpan.org/dist/XML-Simple/lib/XML/Simple.pm
+ *
+ * Example:
+ *
+ * Read a file /tmp/in.xml into YCP map:
+ *
+ * map config = (map)SCR::Read (.anyxml, "/tmp/in.xml")
+ *
+ * Using the agent this way, these default options of XML::Simple library
+ * will be used for reading:
+ *
+ * ForceContent => 1
+ * ForceArray => 1
+ * KeepRoot => 1,
+ * KeyAttr => [],
+ *
+ * Find the description of these arguments in the XML::Simple documentaion.
+ * For example, ForceArray set to 1 "forces nested elements to be represented
+ * as arrays even when there is only one".
+ *
+ * Alternative way of reading is using the argument map. This way it is
+ * possible to specify non-default read options in the "args" submap:
+ *
+ * map config = (map)SCR::Read (.anyxml, $[
+ * "file" : "/tmp/in.xml",
+ * "args" : $[
+ * "ForceArray" : 0,
+ * "KeepRoot" : 1
+ * ]
+ * ])
+ *
+ * Example:
+ *
+ * Writing with the default options:
+ *
+ * Write (.anyxml, $[
+ * "file" : "/tmp/config.xml",
+ * "xml" : config,
+ * ])
+ *
+ * Non-default write options could be used by passing extra submap with
+ * "args" key in the write map:
*
- * $Id:$
+ * Write (.anyxml, $[
+ * "file" : "c.xml",
+ * "xml" : config,
+ * "args : $[
+ * "XMLDecl" : <?xml version="123456789"?>,
+ * "RootName" : "test"
+ * ]
+ * ]);
*/
.anyxml
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=49855&r1=49854&r2=49855&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Fri Aug 8 10:33:06 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Aug 8 10:28:38 CEST 2008 - jsuchome@suse.cz
+
+- anyxml agent documentation added to anyxml.scr (bnc#405291)
+
+-------------------------------------------------------------------
Wed Aug 6 14:23:14 CEST 2008 - tgoettlicher@suse.de
- Fixed bnc #413516: HideBackButton() always hides back button
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org