Java/Android: Parsing XML to get all the xml in a certain tag

Bobsilvio

New Member
I'm programming in java (and ultimately in Android) and I have a set up like this\[code\]<A> <B> <C>stuff</C> <D> <E>other stuff</E> <F>more stuff</F> </D> </B> <B> <C>stuff</C> </B> <B> <C>some stuff</C> <D> <E>basic stuff</E> <F>even more stuff</F> </D> </B></A>\[/code\]I want to parse it so that we get (amongst other things which I've already coded) all the things in both D's so we'd get Strings that look like\[code\]<E>other stuff</E><F>more stuff</F>\[/code\]an empty string ("") and\[code\]<E>basic stuff</E><F>even more stuff</F>\[/code\]The parser I've been using stops as soon as it hits a lesser than symbol '<', so it's been giving me nothing. Is there a way to parse it the way I described in Java?EDIT: I just converted it to a String and used regular expressions.
 
Back
Top