Add Document::read_string().
[libcxml.git] / src / cxml.cc
index 99055ee1da521aff6e0a4e12c9410f24eef22a3e..810abf81deae977c61ee11944382af10bff5eaf8 100644 (file)
@@ -267,6 +267,14 @@ cxml::Document::read_stream (istream& stream)
        take_root_node ();
 }
 
+void
+cxml::Document::read_string (string s)
+{
+       stringstream t (s);
+       _parser->parse_stream (t);
+       take_root_node ();
+}
+
 void
 cxml::Document::take_root_node ()
 {