-public:
- XMLNode ();
- XMLNode (xmlpp::Node const * node);
-
-protected:
- std::string string_node (std::string);
- std::string optional_string_node (std::string);
- ContentKind kind_node (std::string);
- Fraction fraction_node (std::string);
- int64_t int64_node (std::string);
- int64_t optional_int64_node (std::string);
- float float_node (std::string);
- void ignore_node (std::string);
- void done ();
-
- Time time_attribute (std::string);
- float float_attribute (std::string);
- std::string string_attribute (std::string);
- int64_t int64_attribute (std::string);
- int64_t optional_int64_attribute (std::string);
- boost::optional<bool> optional_bool_attribute (std::string);
- boost::optional<Color> optional_color_attribute (std::string);
-
- std::string content ();
-
- template <class T>
- boost::shared_ptr<T> sub_node (std::string name) {
- return boost::shared_ptr<T> (new T (xml_node (name)));
+ std::list<boost::shared_ptr<cxml::Node> > n = node.node_children (name);
+ if (n.size() > 1) {
+ throw XMLError ("duplicate XML tag");
+ } else if (n.empty ()) {
+ return boost::shared_ptr<T> ();