[Simple-support] Multiple redirections to retrieve the elements and attributes.
Brought to you by:
niallg
|
From: A K <ak....@gm...> - 2011-09-08 09:26:56
|
Hi,
Am working with an android project and using Simple XML serialization api's
to parse the xml data. I have a prototype of the code and am porting the
same to suit my project.
In this code, i have multiple class redirections to read the elements and
attributes. for ex, as below -
*public class A
{
private B b;
private C c;
private D d;
public B getB() {
return b;
}
public C getC() {
return c;
}
public D getD() {
return d;
}
}
public class B
{
@Element(name="x", required=false)
private X x;
@Element(name="y", required=false)
private Y y;
@Element(name="z", required=false)
private Z z;
}
*
When i try to retrieve the data from the Class A and call the getB method,
it is throwing an exception. I need to get the instance of the classB. I am
not able to provide the specific Element name to the classB in classA. If
anyone knows the solution. kindly let me know.
|