A wrapper for a xmlpp::Node which simplifies parsing.
More...
#include <cxml.h>
|
| Node (xmlpp::Node *node) |
|
std::string | name () const |
|
std::string | string_child (std::string c) const |
|
boost::optional< std::string > | optional_string_child (std::string) const |
|
bool | bool_child (std::string) const |
|
boost::optional< bool > | optional_bool_child (std::string) const |
|
template<class T > |
T | number_child (std::string c) const |
|
template<class T > |
boost::optional< T > | optional_number_child (std::string c) const |
|
void | ignore_child (std::string) const |
|
void | done () const |
|
std::string | string_attribute (std::string) const |
|
boost::optional< std::string > | optional_string_attribute (std::string) const |
|
bool | bool_attribute (std::string) const |
|
boost::optional< bool > | optional_bool_attribute (std::string) const |
|
template<class T > |
T | number_attribute (std::string c) const |
|
template<class T > |
boost::optional< T > | optional_number_attribute (std::string c) const |
|
std::string | content () const |
|
std::string | namespace_uri () const |
|
std::string | namespace_prefix () const |
|
boost::shared_ptr< Node > | node_child (std::string) const |
|
boost::shared_ptr< Node > | optional_node_child (std::string) const |
|
std::list< boost::shared_ptr
< Node > > | node_children (std::string) const |
|
xmlpp::Node * | node () const |
|
A wrapper for a xmlpp::Node which simplifies parsing.
cxml::Node::Node |
( |
xmlpp::Node * |
node | ) |
|
Construct a Node from an xmlpp::Node. This class will not destroy the xmlpp::Node.
- Parameters
-
string cxml::Node::content |
( |
| ) |
const |
- Returns
- The content of this node
void cxml::Node::done |
( |
| ) |
const |
Check whether all children of this Node have been looked up or passed to ignore_child(). If not, an exception is thrown.
void cxml::Node::ignore_child |
( |
std::string |
| ) |
const |
This will mark a child as to be ignored when calling done()
string cxml::Node::namespace_prefix |
( |
| ) |
const |
- Returns
- namespace prefix of this node
string cxml::Node::namespace_uri |
( |
| ) |
const |
- Returns
- namespace URI of this node
The documentation for this class was generated from the following files: