Re: [Simple-support] Namespace printed after attributes specified in Order annotation
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2012-03-03 08:48:21
|
For now the only way would be to do it as you are doing now, or perhaps use a Visitor, which would probably be overkill. Maybe this is something I should take a look at for the next release, so that the @Order annotation can include namespaces. --- On Fri, 2/3/12, Faisal Siyavudeen <fai...@gm...> wrote: From: Faisal Siyavudeen <fai...@gm...> Subject: [Simple-support] Namespace printed after attributes specified in Order annotation To: "simple-support" <sim...@li...> Received: Friday, 2 March, 2012, 3:47 AM 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 ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |