[one-users] ONE-2.0 CDATA in XML output

Shi Jin jinzishuai at yahoo.com
Tue Nov 30 16:07:45 PST 2010

Hi there,

I used to have some ruby script to parse the output of "onevm show <vmid> -x". After switching from 1.4 to 2.0, they no longer work. I think the problem is that now the output of the XML has lots of CDATA in it. For example
which used to be just

I am not a Ruby expert. Is there any easy way to parse the XML in Ruby to get the CDATA data? My code looks like
def getCPU
                vm=`onevm show  #{VMID} -x`

Thanks a lot.


Shi Jin, PhD


More information about the Users mailing list