Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
Re: [yast-devel] status modul - xml
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Fri, 14 Aug 2009 08:06:41 +0200
  • Message-id: <4A84FEF1.5090400@xxxxxxx>
On 08/13/2009 06:40 PM, Bjoern Geuken wrote:

I'm trying to gave the status rest-service a nicer xml format, but I faced
some problems by sending the times of the values. Inside a browser the xml-
tree looks like that:

<metricgroup group_name="memory">
<metric name="memory-used">
<label type="value">
<value dateTime="1250178710">1.4260408320e+09</value>
<value dateTime="1250178600">1.4165012480e+09</value>
<value dateTime="1250178590">1.4164602880e+09</value>

But when the webclient fetches the data with @client.find(...), it misses the
dateTime attributes:

#<YaST::ServiceResource::Proxies::Status:0x7f5c68fd0c98 @prefix_options={},

@prefix_options={}, @attributes={"group_name"=>"memory",


@prefix_options={}, @attributes={"values"=>
"1.4097973248e+09"], "type"=>"value"}>, "name"=>"memory-used"}>,

It seems that the last branch of an xml-tree (or elements with content?)
can't have any attributes. Is this the expected behaviour or maybe a bug?


Yes, I also face this problem. I solve it by using map or array, so
resulting xml looks like

<metricgroup group_name="memory">
<metric name="memory-used">
<label type="array"> //array because it is array of measures

I hope this helps.
Josef Reidinger
YaST team
maintainer of perl-Bootloader, YaST2-Repair, webyast modules language
and time
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups