boolean dropRootElement) throws Exception {
if (writeXsiType) {
namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
}
Configuration c = new Configuration(namespaceMap);
MappedNamespaceConvention convention = new MappedNamespaceConvention(c);
AbstractXMLStreamWriter xsw = new MappedXMLStreamWriter(
convention,
new OutputStreamWriter(os, UTF8));
if (serializeAsArray) {
if (arrayKeys != null) {