public static XMLStreamReader createStreamReader(InputStream is, boolean readXsiType,
ConcurrentHashMap<String, String> namespaceMap) throws Exception {
if (readXsiType) {
namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
}
MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
}