xml_document Class Reference

#include <xml_parser.h>

Public Member Functions

 xml_document ()
 
xml_node_ptr add_node (xml_node_ptr parent, const char *name)
 
xml_node_ptr add_node (const char *name)
 
template<typename T >
xml_node_ptr add_node (xml_node_ptr parent, const char *name, const T &val)
 
template<typename T >
void add_attribute (xml_node_ptr parent, const char *name, const T &val)
 

Friends

std::ostream & operator<< (std::ostream &out, const xml_document &doc)
 

Detailed Description

XML document wrapper

Constructor & Destructor Documentation

xml_document ( )
inline

Constructor

Member Function Documentation

void add_attribute ( xml_node_ptr  parent,
const char *  name,
const T &  val 
)
inline

Add an attribute to the given parent node

Parameters
parentparent of the node
namename of the node
valvalue of the node
Returns
pointer to new node
xml_node_ptr add_node ( xml_node_ptr  parent,
const char *  name 
)
inline

Add a node to the document with a given parent

Parameters
parentparent of the node
namename of the node
Returns
pointer to new node
xml_node_ptr add_node ( const char *  name)
inline

Add a node to the document root

Parameters
namename of the node
Returns
pointer to new node
xml_node_ptr add_node ( xml_node_ptr  parent,
const char *  name,
const T &  val 
)
inline

Add a node to the document with a given parent

Parameters
parentparent of the node
namename of the node
valvalue of the node
Returns
pointer to new node

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const xml_document doc 
)
friend

Write an XML document to the output stream

Parameters
outoutput stream
docXML document
Returns
output stream

The documentation for this class was generated from the following file: