Plus | - Minimal XML for C++ | (Version 0.9.2) | Giancarlo Niccolai |
#include <mxml_attribute.h>
Inheritance diagram for MXML::Attribute:
Public Member Functions | |
Attribute (std::istream &in, int style=0, int line=1, int pos=0) | |
Deserializes an attribute Reads an attribute from an XML file at current position. | |
Attribute (const std::string &name, const std::string &value) | |
Attribute (Attribute &src) | |
const std::string | name () const |
Returns current name of the attribute. | |
const std::string | value () const |
Returns the value stored in the attribute. | |
void | name (const std::string &new_name) |
Change name of the attribute. | |
void | value (const std::string &new_value) |
Change value of the attribute. | |
virtual void | write (std::ostream &out, const int style) const |
Writes the attribute on a stream. | |
Private Attributes | |
std::string | m_name |
Name of the attribute. | |
std::string | m_value |
Value of the attribute. |
This class represents the node attributes: <node_name attrib_name="attrib value">. The class has support for serializationa and de-serialization.
|
Deserializes an attribute Reads an attribute from an XML file at current position. In case of error Throws an MXML::IOError or MXML::MalformedError.
|
|
|
|
|
|
Change name of the attribute.
|
|
Returns current name of the attribute.
|
|
Change value of the attribute.
|
|
Returns the value stored in the attribute. Parsing the value or transforming it to a proper type (i.e. integer) is left to the caller. |
|
Writes the attribute on a stream. This function is usually called by MXML::Document::write(), or by the << operator (in class MXML::Element), use the latter only for debug.
Implements MXML::Element. |
|
Name of the attribute.
|
|
Value of the attribute.
|