def end_element(name)
case name
when "Allocated", "Limit", "Units", "Used"
if @in_cpu
@response["ComputeCapacity"]["Cpu"][name] = value
elsif @in_deployed_vms_quota
@response["ComputeCapacity"]["DeployedVmsQuota"][name] = value
elsif @in_instantiated_vms_quota
@response["ComputeCapacity"]["InstantiatedVmsQuota"][name] = value
elsif @in_memory
@response["ComputeCapacity"]["Memory"][name] = value
elsif @in_storage_capacity
@response["StorageCapacity"][name] = value
end
when "Cpu"
@in_cpu = false
when "DeployedVmsQuota"
@in_deployed_vms_quota = false
when "InstantiatedVmsQuota"
@in_instantiated_vms_quota = false
when "Memory"
@in_memory = false
when "StorageCapacity"
@in_storage_capacity = false
when "Type"
@response[name] = value
end
end