Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

XMLFile Class Reference

#include <OpenMS/FORMAT/XMLFile.h>

Inheritance diagram for XMLFile:

ConsensusXMLFile FeaturePairsXMLFile FeatureXMLFile GridFile IdXMLFile MzDataFile MzXMLFile Param PTMXMLFile

List of all members.


Detailed Description

Base class for loading/storing XML files that have a handler derived from XMLHandler.

Public Member Functions

 XMLFile ()
 Default constructor.
 XMLFile (const String &schema_location, const String &version)
 Constructor that sets the schema location.
 ~XMLFile ()
 Destructor.
bool isValid (const String &filename) throw (Exception::NotImplemented)
 Checks if a file validates against the XML schema.
const StringgetVersion () const
 return the version of the schema

Protected Member Functions

void parse_ (const String &filename, XMLHandler *handler) throw (Exception::FileNotFound, Exception::ParseError)
 Parses the XML file given by filename using the handler given by handler.
void save_ (const String &filename, XMLHandler *handler) const throw (Exception::UnableToCreateFile)
 Stores the contents of the XML handler given by handler in the file given by filename.

Protected Attributes

String schema_location_
 XML schema file location.
String schema_version_
 Version string.

Constructor & Destructor Documentation

XMLFile (  ) 

Default constructor.

XMLFile ( const String schema_location,
const String version 
)

Constructor that sets the schema location.

~XMLFile (  ) 

Destructor.


Member Function Documentation

bool isValid ( const String filename  )  throw (Exception::NotImplemented)

Checks if a file validates against the XML schema.

If there is no schema available for this file type a NotImplemented exception is thrown.

const String& getVersion (  )  const

return the version of the schema

void parse_ ( const String filename,
XMLHandler handler 
) throw (Exception::FileNotFound, Exception::ParseError) [protected]

Parses the XML file given by filename using the handler given by handler.

void save_ ( const String filename,
XMLHandler handler 
) const throw (Exception::UnableToCreateFile) [protected]

Stores the contents of the XML handler given by handler in the file given by filename.


Member Data Documentation

String schema_location_ [protected]

XML schema file location.

String schema_version_ [protected]

Version string.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:49 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1