belaj_mala
New Member
I need to parse the following XML structure in my Android activity. I have it in String format:\[code\]<Cube> <Cube time="2012-09-20"> <Cube currency="USD" rate="1.2954"/> <Cube currency="JPY" rate="101.21"/> <!-- More cube tags here --> </Cube></Cube>\[/code\]Out of this I want to get an array of currency names (USD, JPY, etc) and their respective rates. Optionally, the date which appears only once in the XML document in the format specified above. Note the empty Cube tag also. There might be other weird occurrences like this as well. I only need to get Cube tags that have both currency and rate set.Preferably using some XML parsing library and not regex, but if it resorts to that I am ready to use it as well.