JAVA Object to XML to JAVA to XML
In one of my project below is my requirement:-
-Create input XMLs from Java class..
-Take input from user then store that data to Java object and submit for processing
-After processing print response java object again in XML.
What is the best API to achieve this. Will be helpful if any example is available.
Will it handle Iterative ArrayList Classes in XML generation?
Thanks for the Reply =)
I have a Java Object that have some fileds like arraylist<Class> will it take care of these fields as well ?
If that arrayList<Class> have another fields that can be normal fileds or arraylist of another class, will it take care of all fields during XML generation?
Example:-
Root Class have below fields
private int ArCt;
private ArrayList<ClassChild1> Ar;
......
Setters
......
Getters
ClassChild1.class
private int PlnCd;
private int cArCt;
private ArrayList cAr<ClassChild2> cAr;
ClassChild2.class
private String PlNm
XML Needed - Example from above object
Quote:
<root>
<ArCt>1</ArCt>
<Ar>
<ClassChild1>
<PlnCd>S</PlnCd>
<cArCt>2</<cArCt>
<cAr>
<ClassChild2>
<PlNm>Plan1</PlNm>
</ClassChild2>
<ClassChild2>
<PlNm>Plan2</PlNm>
</ClassChild2>
</cAr>
</ClassChild1>
</Ar>
</root>