[xsd-users] Can I influence the order of attribute serialization?

Chris Delnooz Chris.Delnooz at hydrix.com
Thu Sep 12 17:32:40 EDT 2013


Hi all,

I have a complex type with a number of attributes  defined as the snippet below.

<xs:complexType name="NamedType" abstract="true">
                <xs:sequence/>
                <xs:attribute name="name" use="required" type="xs:ID"/>
                <xs:attribute name="shortDescription" use="required" type="xs:string">
                <xs:attribute name="fullDescription" use="required" type="xs:string">
                <xs:attribute name="internal" use="optional" default="false" type="xs:boolean"/>
</xs:complexType>

However, if I look at the serialized code, it doesn't respect the order in which the attributes were specified:
<namedType fullDescription="Calibration Objects" growthAsViableCount="false" internal="true" name="calib" shortDescription="Calibration" />

Is there a way to force the serializer code to respect the order in the XSD?

Thanks!


Chris Delnooz | Software Architect
chris.delnooz at hydrix.com<mailto:chris.delnooz at hydrix.com>
Hydrix: Our Expertise - Your Competitive Advantage
www.hydrix.com<http://www.hydrix.com/> | fax +61 3 8573 5289 | direct +61 3 8573 5248



More information about the xsd-users mailing list