XML Tag. More...

#include <rxmlattr.h>

Collaboration diagram for RXMLAttr:
[legend]

Public Member Functions

 RXMLAttr (const RXMLAttr &attr)
 
 RXMLAttr (const RString &name, const RString &value, RURI *xmlns=0)
 
 RXMLAttr (const RString &name, const double value, RURI *xmlns=0)
 
RURIGetNamespace (void) const
 
int Compare (const RString &name) const
 
int Compare (const RXMLAttr &attr) const
 
RString GetFullName (void) const
 
RString GetName (void) const
 
RString GetValue (void) const
 
void SetValue (const RString &value)
 
void AddValue (const RString &value)
 
virtual ~RXMLAttr (void)
 

Private Attributes

RString Name
 
RString Value
 
RURINamespace
 

Detailed Description

XML Tag.

This class provides a representation for a attribute of a XML tag.

See also
RXMLTag

Constructor & Destructor Documentation

RXMLAttr ( const RXMLAttr attr)

Copy constructor.

RXMLAttr ( const RString name,
const RString value,
RURI xmlns = 0 
)

Construct a XML Attribute.

Parameters
nameThe name of the attribute.
valueThe value of the attribute.
xmlnsNamespace.
RXMLAttr ( const RString name,
const double  value,
RURI xmlns = 0 
)

Construct a XML Attribute.

Parameters
nameThe name of the attribute.
valueThe value of the attribute.
xmlnsNamespace.
virtual ~RXMLAttr ( void  )
virtual

Destruct the attribute.

Member Function Documentation

RURI* GetNamespace ( void  ) const

Return the namespace of the tag.

Returns
a string containing the namespace.
int Compare ( const RString name) const

Compare the name of the attribute with a given string. This function is used by RContainer.

Parameters
nameThe string used for the comparison.
Returns
-1,0 or 1 if the attribute is greater, the same or lesser than parameter.
int Compare ( const RXMLAttr attr) const

Compare the names of two attributes. This function is used by RContainer.

Parameters
attrThe attribute used for the comparison.
Returns
-1,0 or 1 if the attribute is greater, the same or lesser than parameter.
RString GetFullName ( void  ) const

Return the full name of the attribute (including the namespace).

Returns
a string containing the name.
RString GetName ( void  ) const

Return the name of the attribute.

Returns
a string containing the name.
RString GetValue ( void  ) const

Returns the value of the attribute.

Returns
a string containing the value;
void SetValue ( const RString value)

Set a new value to the attribute.

Parameters
valueValue to assign.
void AddValue ( const RString value)

Add something to the current value of the attribute.

Field Documentation

RString Name
private

The name of the attribute.

RString Value
private

The value of the attribute.

RURI* Namespace
private

Namespace.