Reputation: 10081
How to parse the XML fragment with SimpleXML in Android?
<txtList>
message <bold>message</bold> message
</txtList>
In fact, I do not know how to retrieve the value of an element that contains another element in this way?
Upvotes: 0
Views: 97
Reputation: 25380
You have to write a class with proper fields. Or - and thats what i recommend - you write a class that contains the values and a Transformer
which "parses" the XML.
However, Simple XML ist not a XML-Parser, it's a Serializer. So you may have a look at e.g. JSoup, a very good HTML / XML Parser.
Upvotes: 1