deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: Model layer for CIMI
Date Thu, 10 Nov 2011 18:55:13 GMT
On Thu, 2011-11-10 at 08:36 -0500, Tong Li wrote:
> I do not think DMTF cimi spec strongly suggested the sequence of the
> elements. At least it did not say in the spec. although most of the samples
> do show a patten of the elements.

That's one of the implicit rules of XML: order matters, DOM's are
ordered trees etc.

>  When I used XmlSimple (), it actually
> keeps the right order with the xml it reads in. The difficulty is when you
> have a hash (produced by XmlSimple from an XML doc), you most likely will
> add or remove things off of the hash, that is where it sequence really get
> messed up, I do not consider it has anything to do with the XmlSimple, it
> is just when hash get serialized to xml or json, probably the serializer
> does not know how to deal with the sequence since the hash certainly does
> not have the sequence information of its members.

Either way, we'll have to write our own XML serialization to make sure
element order is correct; the schema that is declared with the DSL has
the element order (the order in which attributes are declared)

David



Mime
View raw message