summaryrefslogtreecommitdiff
path: root/src/cxml.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-08 22:40:36 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-08 22:40:36 +0100
commit689b1a86d0c4cf4937492f4680457a133df368c6 (patch)
tree1c17ec644538bbcb0fe3b54141e8833a002efff0 /src/cxml.h
parent760ce54a39af82c0f4ea35f836228ce239d5a76d (diff)
Add the ability to find the root node name of some XML.
Diffstat (limited to 'src/cxml.h')
-rw-r--r--src/cxml.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cxml.h b/src/cxml.h
index 0f57b92..a8da82a 100644
--- a/src/cxml.h
+++ b/src/cxml.h
@@ -213,14 +213,19 @@ typedef boost::shared_ptr<const cxml::Node> ConstNodePtr;
class Document : public Node
{
public:
+ Document ();
Document (std::string root_name);
Document (std::string root_name, boost::filesystem::path);
+ virtual ~Document ();
+
void read_file (boost::filesystem::path);
void read_stream (std::istream &);
- virtual ~Document ();
-
+ std::string root_name () const {
+ return _root_name;
+ }
+
private:
void take_root_node ();