[Simple-support] Namespace printed after attributes specified in Order annotation
Brought to you by:
niallg
|
From: Faisal S. <fai...@gm...> - 2012-03-02 11:48:03
|
Hi, First of all, thanks for the excellent "Simple XML" library. I am trying to use it to serialize a class using the following annotations. @Root(strict = false, name = "oxml") @Namespace(reference = "http://www.faisal.in/testschema") @Order(attributes = {"app", "os" }) public class OnXml { .... } Unfortunately, the generated namespace attribute (xmlns) is printed after the attributes specified in the @Order annotation. How can I ensure that the namespace is printed ahead of these attributes? I tried adding "xmlns" to the @Order list, but then the code expects xmlns to be declared as a class member. I finally made it work by adding xmlns as a class member initialized to the namespace string and including it inside @Order. Is there a better way to do this? Regards |