jmConfig = new Configuration();
} else {
jmConfig = new Configuration(config.getXml2JsonNs());
}
return new MappedXMLStreamReader(
new JSONObject(new JSONTokener(ReaderWriter.readFromAsString(nonEmptyReader))),
new MappedNamespaceConvention(jmConfig));
} catch (Exception ex) {
throw new XMLStreamException(ex);
}
case BADGERFISH:
try {
return new BadgerFishXMLStreamReader(new JSONObject(new JSONTokener(ReaderWriter.readFromAsString(nonEmptyReader))));
} catch (Exception ex) {
throw new XMLStreamException(ex);
}
}
// This should not occur