#include <tag.h>
Detailed Description
An XML element's attribute.
- Author
- Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
- Since
- 1.0
Definition at line 59 of file tag.h.
Constructor & Destructor Documentation
Attribute |
( |
Tag * |
parent, |
|
|
const std::string & |
name, |
|
|
const std::string & |
value, |
|
|
const std::string & |
xmlns = EmptyString |
|
) |
| |
Creates a new Attribute from name
, value
and optional xmlns
and attaches it to the given Tag.
In the future: If xmlns
is not empty, and if it is different from the Tag's default namespace, an appropriate and unique namespace declaration (prefix) will be added to the Tag and the attribute will be prefixed accordingly.
- Parameters
-
parent | The Tag to attach the Attribute to. |
name | The attribute's name. Invalid (non-UTF-8) input will be ignored. |
value | The attribute's value. Invalid (non-UTF-8) input will be ignored. |
xmlns | The attribute's namespace. Invalid (non-UTF-8) input will be ignored. |
Definition at line 25 of file tag.cpp.
Attribute |
( |
const std::string & |
name, |
|
|
const std::string & |
value, |
|
|
const std::string & |
xmlns = EmptyString |
|
) |
| |
Creates a new Attribute from name
, value
and optional xmlns
.
- Parameters
-
name | The attribute's name. Invalid (non-UTF-8) input will be ignored. |
value | The attribute's value. Invalid (non-UTF-8) input will be ignored. |
xmlns | The attribute's namespace. Invalid (non-UTF-8) input will be ignored. |
Definition at line 35 of file tag.cpp.
Copy constructor.
- Parameters
-
Definition at line 42 of file tag.cpp.
Destructor.
Definition at line 98 of file tag.h.
Member Function Documentation
const std::string& name |
( |
| ) |
const |
|
inline |
Returns the attribute's name.
- Returns
- The attribute's name.
Definition at line 104 of file tag.h.
Returns true if the Attribute is valid, false otherwise.
Definition at line 171 of file tag.h.
bool operator!= |
( |
const Attribute & |
right | ) |
const |
|
inline |
Checks two Attributes for inequality.
- Parameters
-
Definition at line 165 of file tag.h.
bool operator== |
( |
const Attribute & |
right | ) |
const |
|
inline |
Checks two Attributes for equality.
- Parameters
-
Definition at line 158 of file tag.h.
const std::string & prefix |
( |
| ) |
const |
Returns the attribute's namespace prefix.
- Returns
- The namespace prefix.
Definition at line 105 of file tag.cpp.
bool setPrefix |
( |
const std::string & |
prefix | ) |
|
Sets the attribute's namespace prefix.
- Parameters
-
prefix | The new namespace prefix. |
- Returns
- True if the input is valid UTF-8, false otherwise. Invalid input will be ignored.
Definition at line 85 of file tag.cpp.
bool setValue |
( |
const std::string & |
value | ) |
|
Sets the attribute's value.
- Parameters
-
- Returns
- True if the input is valid UTF-8, false otherwise. Invalid input will be ignored.
Definition at line 67 of file tag.cpp.
bool setXmlns |
( |
const std::string & |
xmlns | ) |
|
Sets the attribute's namespace.
- Parameters
-
- Returns
- True if the input is valid UTF-8, false otherwise. Invalid input will be ignored.
Definition at line 76 of file tag.cpp.
const std::string& value |
( |
| ) |
const |
|
inline |
Returns the attribute's value.
- Returns
- The attribute's value.
Definition at line 110 of file tag.h.
const std::string xml |
( |
| ) |
const |
Returns a string representation of the attribute.
- Returns
- A string representation.
Definition at line 116 of file tag.cpp.
const std::string & xmlns |
( |
| ) |
const |
Returns the attribute's namespace.
- Returns
- The attribute's namespace.
Definition at line 94 of file tag.cpp.
The documentation for this class was generated from the following files: