Closed spaiz closed 5 years ago
can I be sure the elements will preserve its order when building XML using a regular API?
Yes, nodes are created immediately when ele
is called, so the order is preserved.
Is there any way to achieve this using object to xml processing?
Not currently, but I can add a feature to order object keys by alphabetic order or with a user supplied compare function.
We are validating the XML with XSD where the elements defined to be in particular order, so the alphabetical order will not help.
Anyway, if I can rely on the builder API as you told, it should solve our problem.
Thanks!
I need to create an XML with elements in specific order. Is there any way to achieve this using object to xml processing? May be by using some special structure?
I can't rely on the order of keys in the object cause:
If not, can I be sure the elements will preserve its order when building XML using a regular API?
Tnx :)