jAudioFeatureExtractor.ACE.XMLParsers
クラス XMLDocumentParser
java.lang.Object
jAudioFeatureExtractor.ACE.XMLParsers.XMLDocumentParser
public class XMLDocumentParser
- extends java.lang.Object
A holder class for the XMLDocumentParser
method.
This method is a general purpose method for loading an XML
file, testing that the file exists, validating it as a valid
XML file, ensuring that it is of the correct type, parsing
it and extracting its data into the required form. Informative
error exceptions are thrown in a format that can be displayed
directly to users.
Custom handlers can be written to properly extract
information from arbitrary XML files. The types of files
currently implemented are: feature_vector_file, feature_key_file,
taxonomy_file and classifications_file. See the file handlers
for each of these file types for more information on the kind
of data returned.
- 作成者:
- Cory McKay
メソッドの概要 |
static java.lang.Object |
parseXMLDocument(java.lang.String file_path,
java.lang.String document_type)
This method is a general purpose method for loading an XML
file, testing that the file exists, validating it as a valid
XML file, ensuring that it is of the correct type, parsing
it and extracting its data into the required form. |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLDocumentParser
public XMLDocumentParser()
parseXMLDocument
public static java.lang.Object parseXMLDocument(java.lang.String file_path,
java.lang.String document_type)
throws java.lang.Exception
- This method is a general purpose method for loading an XML
file, testing that the file exists, validating it as a valid
XML file, ensuring that it is of the correct type, parsing
it and extracting its data into the required form. Informative
error exceptions are thrown in a format that can be displayed
directly to users.
Custom handlers can be written to properly extract
information from arbitrary XML files. The types of files
currently implemented are: feature_vector_file, feature_key_file,
taxonomy_file and classifications_file. See the file handlers for
each of these file types for more information on the kind of data
returned.
- パラメータ:
file_path
- The path of an XML file that will be parsed.document_type
- The type of XML file. Defined by the name
of the first element in the file.
- 戻り値:
- An array of objects containing information
extracted from the XML file. Object types
depend on type of document parsed.
- 例外:
java.lang.Exception
- Informative exceptions are thrown if an
invalid file path is specified.