[committed]ModelLoader: added XMLImporter

Allow loading of xml files.



Index: src/com/jmex/model/util/ModelLoader.java
===================================================================
--- src/com/jmex/model/util/ModelLoader.java   (revision 4262)
+++ src/com/jmex/model/util/ModelLoader.java   (working copy)
@@ -62,6 +62,7 @@
 import com.jme.util.export.Savable;
 import com.jme.util.export.binary.BinaryExporter;
 import com.jme.util.export.binary.BinaryImporter;
+import com.jme.util.export.xml.XMLImporter;
 import com.jme.util.resource.ResourceLocatorTool;
 import com.jme.util.resource.SimpleResourceLocator;
 import com.jmex.game.StandardGame;
@@ -276,6 +277,7 @@
     private static Map<String, ModelLoaderCallable> loaders = new HashMap<String, ModelLoaderCallable>();
 
     static {
+        loaders.put( "XML", new XMLCallable() );
         loaders.put( "DAE", new DAECallable() );
         loaders.put( "JME", new JMECallable() );
 //              Note that .OBJ Ambient colors are multiplied. I would strongly suggest making them black.
@@ -337,6 +339,13 @@
             return (Node) BinaryImporter.getInstance().load( getURL() );
         }
     }
+   
+    private static class XMLCallable extends ModelLoaderCallable {
+        public XMLCallable() { super( null, null ); }
+        public Node call() throws Exception {
+            return (Node) XMLImporter.getInstance().load( getURL() );
+        }
+    }
 
     private static class DAECallable extends ModelLoaderCallable {
         public DAECallable() { super( null, null ); }

Nice, I guess we could include that one. :wink: