I think its safe to assume that when the xsd for the cimi spec is written it'll be written such that the xml elements will be required to be in the order specified by the xsd.
thanks -Doug ______________________________________________________ STSM | Standards Architect | IBM Software Group (919) 254-6905 | IBM 444-6905 | d...@us.ibm.com The more I'm around some people, the more I like my dog. Tong Li/Raleigh/IBM@IBMUS 11/10/2011 08:36 AM Please respond to deltacloud-dev@incubator.apache.org To deltacloud-dev@incubator.apache.org cc deltacloud-dev@incubator.apache.org Subject Re: Model layer for CIMI 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. 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. just my 2cents. Tong Li Emerging Technologies & Standards Building 501/B205 liton...@us.ibm.com lutter---11/09/2011 04:19:20 PM---This is a model layer for CIMI that does both serialization and deserialization of JSON and XML base From: lut...@redhat.com To: deltacloud-dev@incubator.apache.org Date: 11/09/2011 04:19 PM Subject: Model layer for CIMI This is a model layer for CIMI that does both serialization and deserialization of JSON and XML based on a simple metadata description of the CIMI model expressed in a custom DSL. In particular, we won't need HAML templates to format objects, and I am reasonably sure that the metadata makes sure we serialize in a predictable manner to XML. Patch 1/2 contains the basics, including the DSL, 2/2 shows how this can be used for a specific class. There's a few convenience additions that should be made to the DSL, in particular making it possible to reuse nested structures that are used in several places, something like array :operations, :class => Operation but we can add that later. One small fly in the ointment is that the use of XmlSimple causes child elements in XML to be rendered in an unpredictable order; the CIMI standard doesn't say anything about reordering elements, though with a strict interpretation of XML, the rendered XML does not conform to the XML schema implicitly defined in the CIMI standard. David