#include <Pt/Xml/StartElement.h>
An attribute list of an XML element.
Inherits NonCopyable.
Public Types | |
| typedef Attribute * | Iterator |
| Attribute list iterator. | |
| typedef const Attribute * | ConstIterator |
| Attribute list const iterator. | |
Public Member Functions | |
| AttributeList (NamespaceContext &nsctx) | |
| Construct with namespace context. | |
| void | clear () |
| Clears all content. | |
| Attribute & | append (const QName &name, const Namespace &ns) |
| Appends a new element to the end of the list. More... | |
| const Pt::String & | get (const String &localName) const |
| Gets the value of an attribute. More... | |
| const Pt::String & | get (const Char *localName) const |
| Gets the value of an attribute. More... | |
| const Pt::String & | get (const String &nsUri, const String &localName) const |
| Gets the value of an attribute. More... | |
| const Pt::String & | get (const Char *nsUri, const Char *localName) const |
| Gets the value of an attribute. More... | |
| Iterator | find (const String &localName) |
| Finds an attribute by name. More... | |
| Iterator | find (const Char *localName) |
| Finds an attribute by name. More... | |
| Iterator | find (const String &nsUri, const String &localName) |
| Finds an attribute by name. More... | |
| Iterator | find (const Char *nsUri, const Char *localName) |
| Finds an attribute by name. More... | |
| ConstIterator | find (const String &localName) const |
| Finds an attribute by name. More... | |
| ConstIterator | find (const Char *localName) const |
| Finds an attribute by name. More... | |
| ConstIterator | find (const String &nsUri, const String &localName) const |
| Finds an attribute by name. More... | |
| ConstIterator | find (const Char *nsUri, const Char *localName) const |
| Finds an attribute by name. More... | |
| bool | has (const String &localName) const |
| Checks if an attribute is present. | |
| bool | has (const Char *localName) const |
| Checks if an attribute is present. | |
| bool | has (const String &nsUri, const String &localName) const |
| Checks if an attribute is present. | |
| bool | has (const Char *nsUri, const Char *localName) const |
| Checks if an attribute is present. | |
| Iterator | begin () |
| An iterator to the begin of the sequence. | |
| Iterator | end () |
| An iterator to the end of the sequence. | |
| ConstIterator | begin () const |
| An iterator to the begin of the sequence. | |
| ConstIterator | end () const |
| An iterator to the end of the sequence. | |
| bool | empty () const |
| Returns true if the list is empty. | |
| std::size_t | size () const |
| Returns the size of the list. | |
| NamespaceContext & | namespaceContext () |
| Returns the namespace context for the attributes. | |
A new attribute is added to the end of the list with the name name in the namespace ns
| const Pt::String& get | ( | const String & | localName | ) | const |
The value of the attribute with the local name localName is returned. If no attribute by that name is present, an exception of type XmlError is thrown.
| const Pt::String& get | ( | const Char * | localName | ) | const |
The value of the attribute with the local name localName is returned. If no attribute by that name is present, an exception of type XmlError is thrown.
| const Pt::String& get | ( | const String & | nsUri, |
| const String & | localName | ||
| ) | const |
The value of the attribute with the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an exception of type XmlError is thrown.
| const Pt::String& get | ( | const Char * | nsUri, |
| const Char * | localName | ||
| ) | const |
The value of the attribute with the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an exception of type XmlError is thrown.
An iterator to the the attribute with the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
An iterator to the the attribute with the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
An iterator to the the attribute with the the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
An iterator to the the attribute with the the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
| ConstIterator find | ( | const String & | localName | ) | const |
An iterator to the the attribute with the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
| ConstIterator find | ( | const Char * | localName | ) | const |
An iterator to the the attribute with the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
| ConstIterator find | ( | const String & | nsUri, |
| const String & | localName | ||
| ) | const |
An iterator to the the attribute with the the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.
| ConstIterator find | ( | const Char * | nsUri, |
| const Char * | localName | ||
| ) | const |
An iterator to the the attribute with the the namespace nsUri and the local name localName is returned. If no attribute by that name is present, an iterator to the end of the sequence is returned.