<doc>
<element>
text
<item>
text1
</item>
<item>
text2
</item>
text3
</element>
<element>
another text
</element>
...
</doc>
And I want to extract text to an string like this:
"text text1 text2 text3"
"item" tags are nested inside "element"
Im using xmlpullparser in Android but I could use any other parser if it make things easier. tx.
I parse similar xml files. Here is an example. You'll need to add error checking as appropriate.
Have you had a look at the Android documentation for XMLPullParser? It pretty easy to follow. Let us know if that solves your problem.