Author: ug
Date: Mon Dec 3 14:25:18 2007
New Revision: 42596
URL: http://svn.opensuse.org/viewcvs/yast?rev=42596&view=rev
Log:
XMLToYCPString function added to convert XML string to YCP data
Modified:
trunk/yast2/library/xml/src/XML.ycp
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/library/xml/src/XML.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/xml/src/XML.ycp?rev=42596&r1=42595&r2=42596&view=diff
==============================================================================
--- trunk/yast2/library/xml/src/XML.ycp (original)
+++ trunk/yast2/library/xml/src/XML.ycp Mon Dec 3 14:25:18 2007
@@ -123,6 +123,25 @@
}
/**
+ * Read XML string into YCP
+ * @param XML string to read
+ * @return Map with YCP data
+ */
+ global define map XMLToYCPString( string xmlString) ``{
+ if (size(xmlString) > 0)
+ {
+ map out = (map) SCR::Read(.xml.string, xmlString);
+ y2debug("XML Agent output: %1", out);
+ return out;
+ }
+ else
+ {
+ y2warning("can't convert empty XML string");
+ return $[];
+ }
+ }
+
+ /**
* 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.
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=42596&r1=42595&r2=42596&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Mon Dec 3 14:25:18 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Dec 3 14:24:02 CET 2007 - ug@suse.de
+
+- XMLToYCPString added to convert an XML string to
+ YCP data
+
+-------------------------------------------------------------------
Thu Nov 29 15:35:40 CET 2007 - locilka@suse.cz
- Progress module has been extended to show icons for stages.
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org