Base class for loading/storing XML files that have a handler derived from XMLHandler.
More...
#include <OpenMS/FORMAT/XMLFile.h>
List of all members.
Public Member Functions |
| | XMLFile () |
| | Default constructor.
|
| | XMLFile (const String &schema_location, const String &version) |
| | Constructor that sets the schema location.
|
| virtual | ~XMLFile () |
| | Destructor.
|
| bool | isValid (const String &filename, std::ostream &os=std::cerr) |
| | Checks if a file validates against the XML schema.
|
| const String & | getVersion () const |
| | return the version of the schema
|
Protected Member Functions |
| void | parse_ (const String &filename, XMLHandler *handler) |
| | Parses the XML file given by filename using the handler given by handler.
|
| void | save_ (const String &filename, XMLHandler *handler) const |
| | Stores the contents of the XML handler given by handler in the file given by filename.
|
| void | enforceEncoding_ (const String &encoding) |
Protected Attributes |
| String | schema_location_ |
| | XML schema file location.
|
| String | schema_version_ |
| | Version string.
|
| String | enforced_encoding_ |
| | Encoding string that replaces the encoding (system dependend or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml.
|
Detailed Description
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Constructor & Destructor Documentation
Constructor that sets the schema location.
Member Function Documentation
| void enforceEncoding_ |
( |
const String & |
encoding |
) |
[protected] |
| const String& getVersion |
( |
|
) |
const |
return the version of the schema
| bool isValid |
( |
const String & |
filename, |
|
|
std::ostream & |
os = std::cerr | |
|
) |
| | |
Checks if a file validates against the XML schema.
Error messages are printed to the error stream, unless redirected with the attribute os .
- Exceptions:
-
Parses the XML file given by filename using the handler given by handler.
- Exceptions:
-
Stores the contents of the XML handler given by handler in the file given by filename.
- Exceptions:
-
Member Data Documentation
Encoding string that replaces the encoding (system dependend or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml.
XML schema file location.
| OpenMS / TOPP release 1.10.0 |
Documentation generated on Thu Mar 7 2013 09:43:00 using doxygen 1.7.1 |