@@ -0,0 +1,1551 @@
+//%0A// $Id: MisoSceneParser.java,v 1.1 2001/11/29 20:34:13 mdb Exp $%0A%0Apackage com.threerings.miso.tools.scene.xml;%0A%0Aimport java.io.IOException;%0Aimport java.io.FileInputStream;%0A%0Aimport org.xml.sax.SAXException;%0Aimport org.apache.commons.digester.Digester;%0A%0Aimport com.threerings.miso.scene.MisoSceneModel;%0A%0A/**%0A * A simple class for parsing a standalone miso scene model.%0A */%0Apublic class MisoSceneParser%0A%7B%0A    /**%0A     * Constructs a miso scene parser that parses scenes with the%0A     * specified XML path prefix. See the %7B@link%0A     * MisoSceneRuleSet#MisoSceneRuleSet%7D documentation for more%0A     * information.%0A     */%0A    public MisoSceneParser (String prefix)%0A    %7B%0A        // create and configure our digester%0A        _digester = new Digester();%0A        MisoSceneRuleSet set = new MisoSceneRuleSet();%0A        set.setPrefix(prefix);%0A        _digester.addRuleSet(set);%0A        _digester.addSetNext(prefix, %22setSceneModel%22,%0A                             MisoSceneModel.class.getName());%0A    %7D%0A%0A    /**%0A     * Parses the XML file at the specified path into a miso scene model.%0A     */%0A    public MisoSceneModel parseScene (String path)%0A        throws IOException, SAXException%0A    %7B%0A        _model = null;%0A        _digester.push(this);%0A        _digester.parse(new FileInputStream(path));%0A        return _model;%0A    %7D%0A%0A    /**%0A     * Called by the parser once the scene is parsed.%0A     */%0A    public void setSceneModel (MisoSceneModel model)%0A    %7B%0A        _model = model;%0A    %7D%0A%0A    protected Digester _digester;%0A    protected MisoSceneModel _model;%0A%7D%0A

Wrote a simple miso scene parser.