Add new Document constructor.
[libcxml.git] / src / cxml.cc
index 2ca46ed46971f97d2964f0065d22856cb2219b25..a955b916c5a8af47f1fedbef8b8445bea2e02f24 100644 (file)
@@ -214,6 +214,13 @@ cxml::Document::Document (string root_name)
        _parser = new xmlpp::DomParser;
 }
 
+cxml::Document::Document (string root_name, boost::filesystem::path file)
+       : _root_name (root_name)
+{
+       _parser = new xmlpp::DomParser ();
+       read_file (file);
+}
+
 cxml::Document::~Document ()
 {
        delete _parser;