Re: [Simple-support] XPath serializer.read
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-03-24 11:03:34
|
Hi,
Well if they are ordered you can do.
@Default
public class Root {
@path("type1[1]")
private final Type1Class type;
}
However, the XPath expressions in the @Path annotation is limited. I will be improving this in a future release. However, right now, its got limited functionality.
Niall
--- On Thu, 24/3/11, Francois D. Barnard <fba...@gm...> wrote:
From: Francois D. Barnard <fba...@gm...>
Subject: [Simple-support] XPath serializer.read
To: sim...@li...
Received: Thursday, 24 March, 2011, 3:43 AM
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
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|