#include <rwsf/core/XmlAttribute.h>
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
<ServiceName xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:mustUnderstand="1"> WebData </ServiceName>
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.
rwsf::XmlName, rwsf::XmlNamespace
typedef rwsf::XmlName AttributeName;
XmlAttribute();
Default constructor. Constructs an instance with an empty local name, an empty value, and a namespace with no URI and no prefix.
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.
XmlAttribute(const rwsf::XmlAttribute& a);
Copy constructor. Constructs a deep copy of a.
~XmlAttribute();
Destructor.
XmlAttribute& operator=(const XmlAttribute& rhs);
Assignment operator. Makes self a copy of rhs.
bool operator==(const XmlAttribute& lhs, const XmlAttribute& rhs);
Returns true if lhs and rhs have matching names and values. Compares the local names of lhs and rhs, the URI strings of lhs and rhs and the values of lhs and rhs. If all comparisons are equal, lhs and rhs have matching names and values.
bool operator!=(const XmlAttribute& lhs, const XmlAttribute& rhs);
Returns false if lhs and rhs have matching names and values.
bool operator<(const XmlAttribute& lhs, const XmlAttribute& rhs);
Returns true if the unique name of lhs compares less than the unique name of rhs, using operator<() for std::string.
rwsf::XmlName& getName(); const rwsf::XmlName& getName() const;
Returns the name of this attribute.
const std::string& getValue() const;
Returns the value of this attribute.
void setName(const rwsf::XmlName& name);
Sets the name of this attribute to name.
void setValue(const std::string& value);
Sets the value of this attribute to value.
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.