com.softsynth.jmsl.score
Class ScoreXMLLoader
java.lang.Object
com.softsynth.jmsl.score.ScoreXMLLoader
- All Implemented Interfaces:
- NewXMLObjectListener, XMLListener
public class ScoreXMLLoader
- extends java.lang.Object
- implements XMLListener, NewXMLObjectListener
- Author:
- Nick Didkovsky, copyright 2000 Nick Didkovsky, all rights reserved
Field Summary |
static boolean |
verbose
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
verbose
public static boolean verbose
ScoreXMLLoader
public ScoreXMLLoader()
addScoreLoaderListener
public void addScoreLoaderListener(ScoreLoaderListener listener)
loadXML
public Score loadXML(java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
loadXML
public Score loadXML(java.net.URL url)
throws java.io.IOException
- Throws:
java.io.IOException
loadXMLFromZip
public Score loadXMLFromZip(java.io.InputStream inputStream)
throws java.io.IOException
- Read a score file from a zip archive. InputStream points to that zip archive.
- Throws:
java.io.IOException
loadXML
public Score loadXML(java.io.InputStream stream)
throws java.io.IOException
- Throws:
java.io.IOException
beginElement
public void beginElement(java.lang.String tag,
java.util.Hashtable attributes,
boolean ifEmpty)
- Description copied from interface:
XMLListener
- Handles the start of an element. The flag ifEmpty if there is no content or endTag.
- Specified by:
beginElement
in interface XMLListener
foundContent
public void foundContent(java.lang.String content)
- Description copied from interface:
XMLListener
- Handles the content of an element.
- Specified by:
foundContent
in interface XMLListener
endElement
public void endElement(java.lang.String tag)
- Description copied from interface:
XMLListener
- Handles the end of an element.
- Specified by:
endElement
in interface XMLListener
handleNewXMLObject
public void handleNewXMLObject(java.lang.String tag,
java.lang.Object obj)
- Specified by:
handleNewXMLObject
in interface NewXMLObjectListener
main
public static void main(java.lang.String[] args)