@Override
    public Object load(AssetInfo info) throws IOException {
        try {
            key = info.getKey();
            meshName = key.getName();
            folderName = key.getFolder();
            String ext = key.getExtension();
            meshName = meshName.substring(0, meshName.length() - ext.length() - 1);
            if (folderName != null && folderName.length() > 0) {
                meshName = meshName.substring(folderName.length());
            }
            assetManager = info.getManager();

            if (key instanceof OgreMeshKey) {
                // OgreMeshKey is being used, try getting the material list
                // from it
                OgreMeshKey meshKey = (OgreMeshKey) key;
                materialList = meshKey.getMaterialList();
                String materialName = meshKey.getMaterialName();

                // Material list not set but material name is available
                if (materialList == null && materialName != null) {
                    OgreMaterialKey materialKey = new OgreMaterialKey(folderName + materialName + ".material");
                    try {
                        materialList = assetManager.loadAsset(materialKey);
                    } catch (AssetNotFoundException e) {
                        logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{materialKey, key});
                    }
                }
            } else {
                // Make sure to reset it to null so that previous state
                // doesn't leak onto this one
                materialList = null;
            }

            // If for some reason material list could not be found through
            // OgreMeshKey, or if regular ModelKey specified, load using 
            // default method.
            if (materialList == null) {
                OgreMaterialKey materialKey = new OgreMaterialKey(folderName + meshName + ".material");
                try {
                    materialList = assetManager.loadAsset(materialKey);
                } catch (AssetNotFoundException e) {
                    logger.log(Level.WARNING, "Cannot locate {0} for model {1}", new Object[]{materialKey, key});
                }
            }

            // Added by larynx 25.06.2011
            // Android needs the namespace aware flag set to true                 
            // Kirill 30.06.2011
            // Now, hack is applied for both desktop and android to avoid
            // checking with JmeSystem.
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setNamespaceAware(true);

            XMLReader xr = factory.newSAXParser().getXMLReader();
            xr.setContentHandler(this);
            xr.setErrorHandler(this);

            InputStreamReader r = null;
            try {
                r = new InputStreamReader(info.openStream());
                xr.parse(new InputSource(r));
            } finally {
                if (r != null) {
                    r.close();
                }
            }

            return compileModel();
        } catch (SAXException | ParserConfigurationException ex) {
            IOException ioEx = new IOException("Error while parsing Ogre3D mesh.xml");
            ioEx.initCause(ex);
            throw ioEx;
        }

    }
Normalizes weights if needed and finds largest amount of weights used for
all vertices in the buffer.
jme3-plugins/src/ogre/java/com/jme3/scene/plugins/ogre/MeshLoader.java