#include <libxml++/parsers/domparser.h>
Public Member Functions | |
DomParser (const Glib::ustring& filename, bool validate=false) | |
Instantiate the parser and parse a document immediately. | |
virtual void | parse_file (const Glib::ustring& filename) |
Parse an XML document from a file. | |
virtual void | parse_memory (const Glib::ustring& contents) |
Parse an XML document from a string. | |
void | parse_memory_raw (const unsigned char* contents, size_type bytes_count) |
Parse an XML document from raw memory. | |
virtual void | parse_stream (std::istream& in) |
Parse an XML document from a stream. | |
operator bool () const | |
Test whether a document has been parsed. |
xmlpp::DomParser::DomParser | ( | const Glib::ustring & | filename, | |
bool | validate = false | |||
) | [explicit] |
Instantiate the parser and parse a document immediately.
exception |
filename | The path to the file. | |
validate | Whether the parser should validate the XML. |
virtual void xmlpp::DomParser::parse_file | ( | const Glib::ustring & | filename | ) | [virtual] |
Parse an XML document from a file.
exception |
filename | The path to the file. |
Implements xmlpp::Parser.
virtual void xmlpp::DomParser::parse_memory | ( | const Glib::ustring & | contents | ) | [virtual] |
Parse an XML document from a string.
exception |
contents | The XML document as a string. |
Implements xmlpp::Parser.
void xmlpp::DomParser::parse_memory_raw | ( | const unsigned char * | contents, | |
size_type | bytes_count | |||
) |
Parse an XML document from raw memory.
exception |
contents | The XML document as an array of bytes. | |
bytes_count | The number of bytes in the contents array. |
virtual void xmlpp::DomParser::parse_stream | ( | std::istream & | in | ) | [virtual] |
Parse an XML document from a stream.
exception |
in | The stream. |
Implements xmlpp::Parser.