[Simple-support] XPath serializer.read
Brought to you by:
niallg
|
From: Francois D. B. <fba...@gm...> - 2011-03-24 10:44:05
|
hi I have a xml structure looking something like this [data.xml] <root> <type1 id="1_1"/> <type1 id="1_2"/> <type1 id="1_3"/> <type2 id="2_1"/> <type2 id="2_2"/> <type2 id="2_3"/> <type3 id="3_1"/> <type3 id="3_2"/> <type3 id="3_3"/> </root> I created a class for root and a class each for the different types. The root class has lists of type something like List<Type1Class> Type1List List<Type2Class> Type2List List<Type3Class> Type3List All this is working fine. The problem i have is this file isgetting bigger by the day and i am working on a android so resources are limited. So the question is is there a way for me to serialize/deserialize this big xml file by providing xpath to determine what node i want as the source. something like this Type1Class tmp = serializer.read(Type1Class.class,"data.xml","/root/type1[@id='1_2']"); thanks |