Add ::namespace_prefix method.
authorCarl Hetherington <cth@carlh.net>
Sun, 25 Aug 2013 10:05:05 +0000 (11:05 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 25 Aug 2013 10:05:05 +0000 (11:05 +0100)
src/cxml.cc
src/cxml.h

index 20d06ee89d0b0bc907b9ddb4bde2b764113a0409..05053ab1204667f44491d9030c9767607f4b57a9 100644 (file)
@@ -196,6 +196,12 @@ cxml::Node::content () const
        return content;
 }
 
+string
+cxml::Node::namespace_prefix () const
+{
+       return _node->get_namespace_prefix ();
+}
+
 cxml::File::File (string file, string root_name)
 {
        if (!filesystem::exists (file)) {
index 9581adce01e8ea6b0f922b4df00d0656217997bc..8a7a82cb266b72089fd412a452e6713d0ea6be76 100644 (file)
@@ -146,6 +146,9 @@ public:
        /** @return The content of this node */
        std::string content () const;
 
+       /** @return namespace prefix of this node */
+       std::string namespace_prefix () const;
+
        boost::shared_ptr<Node> node_child (std::string) const;
        boost::shared_ptr<Node> optional_node_child (std::string) const;