Package xml

Class XmlSceneParser

java.lang.Object
xml.XmlSceneParser

public class XmlSceneParser
extends java.lang.Object
A class which parses an XML file and constructs the Scene.
  • Constructor Summary

    Constructors
    Constructor Description
    XmlSceneParser()
    Default constructor for the XML scene parser.
  • Method Summary

    Modifier and Type Method Description
    Scene parse​(java.lang.String xmlFile)
    Create a Scene from the given XML file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XmlSceneParser

      public XmlSceneParser()
      Default constructor for the XML scene parser.
  • Method Details

    • parse

      public Scene parse​(java.lang.String xmlFile) throws java.io.IOException
      Create a Scene from the given XML file.
      Parameters:
      xmlFile - The filename of the XML file containing the Scene information.
      Returns:
      A new Scene reflecting the information in the given XML file.
      Throws:
      java.io.IOException - If the file could not be opened.
      XmlParserException - if the XML file is unparsable.