HydraExpress™ C++ 2019 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Represents an attribute of an XML element. More...
#include <rwsf/core/XmlAttribute.h>
Public Types | |
typedef rwsf::XmlName | AttributeName |
Public Member Functions | |
XmlAttribute () | |
XmlAttribute (const rwsf::XmlName &name, const std::string &value) | |
XmlAttribute (const std::string &name, const std::string &value, const rwsf::XmlNamespace &ns=rwsf::XmlNamespace::getEmptyNamespace()) | |
XmlAttribute (const XmlAttribute &a) | |
~XmlAttribute () | |
rwsf::XmlName & | getName () |
const rwsf::XmlName & | getName () const |
const std::string & | getValue () const |
XmlAttribute & | operator= (const XmlAttribute &rhs) |
void | setName (const rwsf::XmlName &name) |
void | setValue (const std::string &value) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const XmlAttribute &lhs, const XmlAttribute &rhs) |
bool | operator< (const XmlAttribute &lhs, const XmlAttribute &rhs) |
bool | operator== (const XmlAttribute &lhs, const XmlAttribute &rhs) |
rwsf::XmlAttribute represents an attribute of an XML element. Each attribute consists of an attribute name represented by an rwsf::XmlName and a value string. For example, the element
contains an attribute with the name SOAP-ENV:mustUnderstand
and the value string "1"
. Although, in this case, the URI component of the attribute name does not appear in the element, the rwsf::XmlName object representing this attribute name contains a URI for the SOAP-ENV
prefix.
AttributeName is a typedef for an instance of rwsf:XmlName representing an attribute name.
rwsf::XmlAttribute::XmlAttribute | ( | ) |
Default constructor. Constructs an instance with an empty local name, an empty value, and a namespace with no URI and no prefix.
rwsf::XmlAttribute::XmlAttribute | ( | const rwsf::XmlName & | name, |
const std::string & | value | ||
) |
Constructs an rwsf::XmlAttribute from an attribute name and the provided value.
rwsf::XmlAttribute::XmlAttribute | ( | const std::string & | name, |
const std::string & | value, | ||
const rwsf::XmlNamespace & | ns = rwsf::XmlNamespace::getEmptyNamespace() |
||
) |
Constructs an rwsf::XmlAttribute with the local name name and the provided value. The name will be qualified by the ns provided, or an empty namespace if no ns is present.
rwsf::XmlAttribute::XmlAttribute | ( | const XmlAttribute & | a | ) |
Copy constructor. Constructs a deep copy of a
.
rwsf::XmlAttribute::~XmlAttribute | ( | ) |
Destructor.
rwsf::XmlName& rwsf::XmlAttribute::getName | ( | ) |
Returns the name of this attribute.
const rwsf::XmlName& rwsf::XmlAttribute::getName | ( | ) | const |
Returns the name of this attribute.
const std::string& rwsf::XmlAttribute::getValue | ( | ) | const |
Returns the value of this attribute.
XmlAttribute& rwsf::XmlAttribute::operator= | ( | const XmlAttribute & | rhs | ) |
Assignment operator. Makes self a copy of rhs.
void rwsf::XmlAttribute::setName | ( | const rwsf::XmlName & | name | ) |
Sets the name of this attribute to name.
void rwsf::XmlAttribute::setValue | ( | const std::string & | value | ) |
Sets the value of this attribute to value.
|
related |
Returns false
if lhs and rhs have matching names and values.
|
related |
Returns true
if the unique name of lhs compares less than the unique name of rhs, using operator<
for std::string.
|
related |
Returns true
if lhs and rhs have matching names and values. Compares the local names, URI strings, and values of lhs and rhs. If all comparisons are equal, lhs and rhs have matching names and values.
Copyright © 2019 Rogue Wave Software, Inc. All Rights Reserved. |