tags:

views:

28

answers:

0

Hi,

I use xmlBeans library for handling xml files. Suppose I have a xml like below:

<exDoc>
<A name="a1">
<B name="b1">
<c name="c11"/>
<c name="c12"/>
</B>
</A>
<A name="a2">
<B name="b2">
<c name="c21"/>
<c name="c22"/>
</B>
</A>
</exDoc>

I want to get only the entire element A with name a2 instead of loading the entire document in the memory.How do i do this? Also i want to get all names of element A along with name of B i.e a1:b1,a2:b2.

how can i do it ?

thank you