|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.palserv.XMidi.XM
public class XM
Convert an XMidi file (XML) to a midi file.
This class can be used in two ways:
XM xm = new XM(args);
xm.xMidiToMidi();
Even though the XMidi format has a DTD (XMidi.dtd) associated with it, this program does quite a bit of its own validation. This may be somewhat redundant, but it will allow the program to work on an XMidi file which does not name a DTD. The validation forces many of the same things as the DTD, although there are differences.
Constructor Summary | |
---|---|
XM(java.lang.String[] args)
public constructor Takes "command line" arguments. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Process each element's contents. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Process the end of each (XML) element. |
static void |
main(java.lang.String[] args)
This method is for command line invocation. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Process each (XML) element when it is encountered. |
void |
xMidiToMidi()
Convert an XMidi file (XML) to a midi file. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XM(java.lang.String[] args)
Util.getCmdLine
method for details.
Also, see the main package description
for details about external parsers.
args
- - command line arguments (as in main)Method Detail |
---|
public void xMidiToMidi()
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
public static void main(java.lang.String[] args)
Util.getCmdLine
method for details of the command line syntax.
args
- - command line
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |