I have a complex xml string that i have to parse i retrieve some data, here is the content :
<root1>
<root2>
<A>something</A>
<B>something</B>
<C>
<D>
<GetE>DataE</GetE>
<GetF>DataF</GetF>
<G>something</G>
<H>something</H>
<I>
<J>
<GetK>DataK</GetK>
<GetL>DataL</GetL>
</J>
</I>
</D>
<D>
<GetE>DataE</GetE>
<GetF>DataF</GetF>
<G>something</G>
<H>something</H>
<I>
<J>
<GetK>DataK</GetK>
<GetL>DataL</GetL>
</J>
</I>
</D>
</C>
</root2>
</root1>
I would like to print the content of GetE
, GetF
, GetK
and GetL
:
for example :
GetE = DataE,GetF = DataF,GetK = DataK,GetL = DataL
GetE = DataE,GetF = DataF,GetK = DataK,GetL = DataL
...
To convert my String data to an XML, I use this function In Java, how do I parse XML as a String instead of a file?
Any idea please ?