DOM XML parser.  More...
#include <libxml++/parsers/domparser.h>
| 
Additional Inherited Members | 
| typedef unsigned int | size_type | 
| enum | MsgType { MsgParserError,
 MsgParserWarning,
 MsgValidityError,
 MsgValidityWarning
 }
 | 
| static void | callback_parser_error (void* ctx, const char* msg,...) | 
| static void | callback_parser_warning (void* ctx, const char* msg,...) | 
| static void | callback_validity_error (void* ctx, const char* msg,...) | 
| static void | callback_validity_warning (void* ctx, const char* msg,...) | 
| static void | callback_error_or_warning (MsgType msg_type, void* ctx, const char* msg, va_list var_args) | 
Detailed Description
Constructor & Destructor Documentation
      
        
          | xmlpp::DomParser::DomParser | ( |  | ) |  | 
      
 
Create a parser with an empty document. 
- Exceptions
- 
  
  
 
 
  
  | 
        
          | xmlpp::DomParser::DomParser | ( | const Glib::ustring & | filename, |  
          |  |  | bool | validate = false |  
          |  | ) |  |  |  | explicit | 
 
Instantiate the parser and parse a document immediately. 
- Parameters
- 
  
    | filename | The path to the file. |  | validate | Whether the parser should validate the XML. |  
 
- Exceptions
- 
  
  
 
 
  
  | 
        
          | virtual xmlpp::DomParser::~DomParser | ( |  | ) |  |  | virtual | 
 
 
Member Function Documentation
      
        
          | Document* xmlpp::DomParser::get_document | ( |  | ) |  | 
      
 
Get the parsed document. 
- Returns
- A pointer to the parsed document, or 0.
 
 
      
        
          | const Document* xmlpp::DomParser::get_document | ( |  | ) | const | 
      
 
Get the parsed document. 
- Returns
- A pointer to the parsed document, or 0.
 
 
      
        
          | xmlpp::DomParser::operator bool | ( |  | ) | const | 
      
 
Test whether a document has been parsed. 
 
 
  
  | 
        
          | virtual void xmlpp::DomParser::parse_context | ( |  | ) |  |  | protectedvirtual | 
 
 
  
  | 
        
          | virtual void xmlpp::DomParser::parse_file | ( | const Glib::ustring & | filename | ) |  |  | virtual | 
 
Parse an XML document from a file. 
If the parser already contains a document, that document and all its nodes are deleted. 
- Parameters
- 
  
    | filename | The path to the file. |  
 
- Exceptions
- 
  
  
Implements xmlpp::Parser.
 
 
  
  | 
        
          | virtual void xmlpp::DomParser::parse_memory | ( | const Glib::ustring & | contents | ) |  |  | virtual | 
 
Parse an XML document from a string. 
If the parser already contains a document, that document and all its nodes are deleted. 
- Parameters
- 
  
    | contents | The XML document as a string. |  
 
- Exceptions
- 
  
  
Implements xmlpp::Parser.
 
 
      
        
          | void xmlpp::DomParser::parse_memory_raw | ( | const unsigned char * | contents, | 
        
          |  |  | size_type | bytes_count | 
        
          |  | ) |  |  | 
      
 
Parse an XML document from raw memory. 
If the parser already contains a document, that document and all its nodes are deleted. 
- Parameters
- 
  
    | contents | The XML document as an array of bytes. |  | bytes_count | The number of bytes in the contents array. |  
 
- Exceptions
- 
  
  
 
 
  
  | 
        
          | virtual void xmlpp::DomParser::parse_stream | ( | std::istream & | in | ) |  |  | virtual | 
 
Parse an XML document from a stream. 
If the parser already contains a document, that document and all its nodes are deleted. 
- Parameters
- 
  
  
- Exceptions
- 
  
  
Implements xmlpp::Parser.
 
 
  
  | 
        
          | virtual void xmlpp::DomParser::release_underlying | ( |  | ) |  |  | protectedvirtual | 
 
 
Member Data Documentation
The documentation for this class was generated from the following file: