com.palserv.XMidi
Class XSilfide
java.lang.Object
|
+--com.palserv.XMidi.XSilfide
- All Implemented Interfaces:
- Parser
- public class XSilfide
- extends java.lang.Object
- implements Parser
This class allows the silfide XML parser
to be used with the XMidi package.
I suggest that this class be used as a model for making
classes to allow inclusion of external parsers.
This class must implement com.palserv.XMidi.Parser
- Author:
- Peter Arthur Loeb
Constructor Summary |
XSilfide()
The default constructor (which takes no arguments
and does nothing) is necessary. |
Method Summary |
org.w3c.dom.Document |
getNewDoc()
Create a new (empty) Document. |
org.w3c.dom.Document |
parseXML(java.lang.String fid)
This is a conversion routine. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSilfide
public XSilfide()
- The default constructor (which takes no arguments
and does nothing) is necessary.
It is used by the
Util.getDoc
method to load this class.
parseXML
public org.w3c.dom.Document parseXML(java.lang.String fid)
- This is a conversion routine. It is invoked from
the
Util.getDoc
method to parse the XML file for the XM class.
Although the argument is meant to be a file id, it
doesn't need to be, it can be any string needed.
It will come from the first non-option argument
to the XM class.
- Specified by:
parseXML
in interface Parser
- Parameters:
String
- fid - file id of XML file to parse.- Returns:
- Document as in com.w3c.dom.Document or a sub-class.
getNewDoc
public org.w3c.dom.Document getNewDoc()
- Create a new (empty) Document.
It is invoked from the
Util.getDoc
method to obtain a new Document for the MX class.
- Specified by:
getNewDoc
in interface Parser
- Returns:
- Document