This class implements a facade for the xml Element. More...
#include <mia/core/xmlinterface.hh>
Public Types | |
typedef std::shared_ptr< CXMLElement > | Pointer |
Public Member Functions | |
CXMLElement::Pointer | add_child (const char *name) |
add a new child element More... | |
CXMLElement (const char *name) | |
CXMLElement (const CXMLElement &orig)=delete | |
const std::vector< CXMLElement::Pointer > & | get_all_children () const |
const std::string | get_attribute (const std::string &name) const |
std::vector< CXMLElement::Pointer > | get_children (const char *name) const |
const std::string & | get_content () const |
const std::string & | get_name () const |
CXMLElement & | operator= (const CXMLElement &orig)=delete |
void | set_attribute (const char *name, const std::string &value) |
Set an attribute of the node. More... | |
void | set_child_text (const std::string &value) |
~CXMLElement () | |
Friends | |
class | CXMLDocument |
This class implements a facade for the xml Element.
This class implements a facade for the XML IO to makes it possible to change the used underlying XML implementation. It is also useful to reduce the compile time dependencies for programs that use MIA.
The implemented support for XML is limted, i.e. there is no support for namespaces, schemes, and interleaved node content.
Definition at line 49 of file xmlinterface.hh.
typedef std::shared_ptr<CXMLElement> CXMLElement::Pointer |
Definition at line 51 of file xmlinterface.hh.
CXMLElement::CXMLElement | ( | const char * | name | ) |
Create a new node
name | tag of the node |
CXMLElement::~CXMLElement | ( | ) |
|
delete |
CXMLElement::Pointer CXMLElement::add_child | ( | const char * | name | ) |
add a new child element
This method adds a new child element to this node
name | name tag of the new child element |
const std::vector<CXMLElement::Pointer>& CXMLElement::get_all_children | ( | ) | const |
const std::string CXMLElement::get_attribute | ( | const std::string & | name | ) | const |
retrive an attribute value
name | attribute name to retrive |
std::vector<CXMLElement::Pointer> CXMLElement::get_children | ( | const char * | name | ) | const |
retrive first level children with a certain tag
name | tag of the nodes to be retrived |
const std::string& CXMLElement::get_content | ( | ) | const |
const std::string& CXMLElement::get_name | ( | ) | const |
|
delete |
void CXMLElement::set_attribute | ( | const char * | name, |
const std::string & | value | ||
) |
Set an attribute of the node.
This method sets an attribute of a node
name | attribute name |
value | (string) value of the attribute |
void CXMLElement::set_child_text | ( | const std::string & | value | ) |
Set the child text of the node
value | text value to be set |
|
friend |
Definition at line 123 of file xmlinterface.hh.