The XMLPullParser implementation only likes well-formed XML documents. E.g. when having multiple root nodes:
start tag not allowed in epilog but got T (position: END_TAG seen ... android:text="padding"\n android:background="#ff0000" />\n\n<T... @9:3)
org.xmlpull.v1.XmlPullParserException: start tag not allowed in epilog but got T (position: END_TAG seen ... android:text="padding"\n android:background="#ff0000" />\n\n<T... @9:3)
But we also want to be able to recompose partial XML documents (e.g. see #5).
We could:
Figure out if XMLPullParser supports a quirks mode that will continue parsing documents that are not strictly following the XML standard.
Manually fix up the XML before parsing it (e.g. introducing a root node that we will skip when parsing).
Use a different, more forgiving parser.
Write a minimal parser implementation that parses tags / attributes and doesn't require strict XML documents.
Needed for #5.
The
XMLPullParser
implementation only likes well-formed XML documents. E.g. when having multiple root nodes:But we also want to be able to recompose partial XML documents (e.g. see #5).
We could:
XMLPullParser
supports a quirks mode that will continue parsing documents that are not strictly following the XML standard.