Base class for loading/storing XML files that have a handler derived from XMLHandler.  
 More...
#include <OpenMS/FORMAT/XMLFile.h>
Base class for loading/storing XML files that have a handler derived from XMLHandler. 
 
◆ XMLFile() [1/2]
◆ XMLFile() [2/2]
Constructor that sets the schema location. 
 
 
◆ ~XMLFile()
◆ enforceEncoding_()
  
  
      
        
          | void enforceEncoding_  | 
          ( | 
          const String &  | 
          encoding | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ getVersion()
      
        
          | const String& getVersion  | 
          ( | 
           | ) | 
           const | 
        
      
 
return the version of the schema 
 
 
◆ isValid()
      
        
          | bool isValid  | 
          ( | 
          const String &  | 
          filename,  | 
        
        
           | 
           | 
          std::ostream &  | 
          os  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Checks if a file validates against the XML schema. 
Error messages are printed to the error stream, unless redirected with the attribute os .
- Parameters
 - 
  
    | filename | The name of the file to validate.  | 
    | os | The ostream where error messages should be send. | 
  
   
- Exceptions
 - 
  
  
 
 
 
◆ parse_()
Parses the XML file given by filename using the handler given by handler. 
- Exceptions
 - 
  
  
 
 
 
◆ parseBuffer_()
  
  
      
        
          | void parseBuffer_  | 
          ( | 
          const std::string &  | 
          buffer,  | 
         
        
           | 
           | 
          XMLHandler *  | 
          handler  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Parses the in-memory buffer given by buffer using the handler given by handler. 
- Note
 - Currently the buffer needs to be plain text, gzip buffer is not supported.
 
- Exceptions
 - 
  
  
 
 
 
◆ save_()
Stores the contents of the XML handler given by handler in the file given by filename. 
- Exceptions
 - 
  
  
 
 
 
◆ enforced_encoding_
Encoding string that replaces the encoding (system dependent or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml. 
 
 
◆ schema_location_
XML schema file location. 
 
 
◆ schema_version_