From: Carl Hetherington Date: Sun, 25 Aug 2013 10:05:05 +0000 (+0100) Subject: Add ::namespace_prefix method. X-Git-Tag: v0.05~1^2~1 X-Git-Url: https://main.carlh.net/gitweb/?p=libcxml.git;a=commitdiff_plain;h=0f7139e9ae4261b2b63e643239fc14c4c84850c0;hp=5ff4c60f4982ec44d34e4cf0d04cab574a76883b Add ::namespace_prefix method. --- diff --git a/src/cxml.cc b/src/cxml.cc index 20d06ee..05053ab 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -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)) { diff --git a/src/cxml.h b/src/cxml.h index 9581adc..8a7a82c 100644 --- a/src/cxml.h +++ b/src/cxml.h @@ -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_child (std::string) const; boost::shared_ptr optional_node_child (std::string) const;