[xsd-users] Preserving element order with groups when writing XML

Jiri Krutil jiri at krutil.com
Tue Jun 7 04:31:04 EDT 2011


Hi

In a previous post called "Bug with groups and occurence", someone  
described the same problem I am having now - order of elements is lost  
when working with xsd:groups.

I have complexTypes representing binary and ternary operators, which  
may have different operands. The order of operands matters. Both  
operator and operand types are defined using xsd:group.

In the old thread I mentioned, Boris describes a workaround involving  
DOM association, which allows to read such XML in order.

My question is: is there a similar workaround for *writing* such XML  
documents? (I cannot change the schema.) Does it involve type  
customization? Could you please point me to a piece of docs or an  
example?

Many thanks
Jiri



More information about the xsd-users mailing list