classIBXMLCALL AttributeList

The class represents a list of an XML element's attributes and associated values

Public

[more] Constructors and destructor.
[more] Virtual attributes interface.


Documentation

The class represents a list of an XML element's attributes and associated values. An AttributeList object is passed as a reference to the startElement() method of the current DocumentHandler when the Parser instance encounters an element.

An AttributeList object and its contents is only valid for the duration of the startElement() call. No references to the object or its contents should be retained.

AttributeList instances only enumerate attributes and values which are actually specified in and not IMPLIED attributes. Theattributes are not necessarily presented in the order of declaration.

o Constructors and destructor.

o AttributeList()
Default constructor.

ovirtual ~AttributeList()
Destructor.

o Virtual attributes interface.

oint getLength() const
Return the number of attributes and associated values in the list.
Returns:
Number of attributes in the list or 0 if there are no attributes in the list.

oibxmlchar* getName(const unsigned int i) const
Return the name of an attribute by its position in the list.
Returns:
Returns a pointer to a string containing the name of the attribute if the provided index is inside the range [0, getLength()]. If the index is outside this range, null is returned.
Parameters:
i - Zero-based index in the list of the name to be retrieved.

oibxmlchar* getType(const unsigned int i) const
Return the type of an attribute by its position in the list. As the underlying parser does not report attribute types, this method will return a pointer to a string containing "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, Ättribute-Value Normalization").
Returns:
Returns a pointer to a string containing the type of the attribute if the provided index is inside the range [0, getLength()]. If the index is outside this range, null is returned.
Parameters:
i - Zero-based index in the list of the type to be retrieved.

oibxmlchar* getValue(const unsigned int i) const
Return the value of an attribute by its position in the list.
Returns:
Returns a pointer to a string containing the value of the attribute if the provided index is inside the range [0, getLength()]. If the index is outside this range, null is returned.
Parameters:
i - Zero-based index in the list of the value to be retrieved.

oibxmlchar* getType(const ibxmlchar* name) const
Return the type of an attribute by its name. As the underlying parser does not report attribute types, this method will return a pointer to a string containing "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, Ättribute-Value Normalization").
Returns:
Returns a pointer to a string containing the type of the attribute or null if the attribute does not exist in the list.
Parameters:
name - Pointer to a string containing the name of the attribute whose type should be retrieved.

oibxmlchar* getValue(const ibxmlchar* name) const
Return the value of an attribute by its name.
Returns:
Returns a pointer to a string containing the value of the attribute or null if the attribute does not exist in the list.
Parameters:
name - Pointer to a string containing the name of the attribute whose value should be retrieved.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.