I have an issue where I want to store the content of a node I am parsing using the XmlPullParser
as a string for later parsing. However I can't see how to do this without iterating over the entire content and creating the string myself by creating the start tags etc.
I have read this question, however it is going about it in exactly the way I want to avoid (preferably).
Here is some example XML below.
<result mime="text/xml">
<array>
<item key="action">
<str>testcustom</str>
</item>
<item key="examplearray">
<array>
<item key="0">
<str>Item 0</str>
</item>
<item key="1">
<str>Item 1</str>
</item>
<item key="2">
<str>Item 2</str>
</item>
</array>
</item>
</array>
</result>
My Question
So in this example, I want to get the contents of the result node as an xml string. I don't want to parse it I just want to store it as String
for parsing at a later date.
If anyone has any better ideas please let me know.