// get the content
XMLOutputter xmlOutputter = new XMLOutputter();
while (true) {
switch (event) {
case XmlPullParser.TEXT:
sb.append(xmlOutputter.escapeElementEntities(parser.getText()));
break;
case XmlPullParser.START_TAG:
sb.append('<' + parser.getName());
int attributeCount = parser.getAttributeCount();
for (int i = 0; i < attributeCount; i ++) {