com.threerings.whirled.tools.xml

## Class SceneParser

- java.lang.Object
- - com.threerings.whirled.tools.xml.SceneParser

Direct Known Subclasses:
  StageSceneParser

    public class SceneParser
    extends Object

A simple class for parsing an editable scene instance.

### Constructor Summary

Constructors
Constructor and Description
`SceneParser(String prefix)` Constructs a scene parser that parses scenes with the specified XML path prefix.

### Method Summary

All Methods Instance Methods Concrete Methods
`SceneModel` `parseScene(InputStream scene)` Parses the XML file provided by `scene` into a scene model instance.
`SceneModel` `parseScene(String path)` Parses the XML file at the specified path into a scene model instance.
`void` `registerAuxRuleSet(com.threerings.tools.xml.NestableRuleSet set)` Adds a `NestableRuleSet` for parsing auxiliary scene models.
`void` `setScene(SceneModel model)` Called by the parser once the scene is parsed.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SceneParser

    public SceneParser(String prefix)

Constructs a scene parser that parses scenes with the specified XML path prefix.

### Method Detail

#### registerAuxRuleSet

    public void registerAuxRuleSet(com.threerings.tools.xml.NestableRuleSet set)

Adds a `NestableRuleSet` for parsing auxiliary scene models.

#### parseScene

    public SceneModel parseScene(String path)
                          throws IOException,
                                 SAXException

Parses the XML file at the specified path into a scene model instance.

Throws:
  `IOException`
  `SAXException`

#### parseScene

    public SceneModel parseScene(InputStream scene)
                          throws IOException,
                                 SAXException

Parses the XML file provided by `scene` into a scene model instance.

Throws:
  `IOException`
  `SAXException`

#### setScene

    public void setScene(SceneModel model)

Called by the parser once the scene is parsed.