Hi folks. Here is my java file and the required marshalled xml output.

 

public class Flat{

private string a;

private boolean b;

            

            //getters and setters

}

 

<flat>

            <attribute type="string">valA</attribute>

            <attribute type="boolean">valB</attribute>

</flat>

 

The way I am doing it now is to convert Flat object into an arraylist of
"Attribute" objects using reflections API. (Attribute object has type
and value). Then I am marshalling it.

 

Is there any easier way to do this?

 

Thanks,

Sairam.

 

Reply via email to