1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __ATTRIBUTE_H__
17 #define __ATTRIBUTE_H__
19 #include <xml/taginfo.h>
26 Specifies the type of this attribute object.
27 These values are defined in the xml specification.
28 For other specifications they may also be used or 'none'.
29 @see http://www.w3.org/TR/REC-xml#sec-attribute-types
36 Specifies a string type.
41 Specifies a tokenized type.
46 Specifies a tokenized type.
51 Specifies a tokenized type.
53 EAttributeType_IDREFS,
56 Specifies a tokenized type.
58 EAttributeType_NMTOKEN,
61 Specifies a tokenized type.
63 EAttributeType_NMTOKENS,
66 Specifies a tokenized type.
68 EAttributeType_ENTITY,
71 Specifies a tokenized type.
73 EAttributeType_ENTITIES,
76 Specifies a tokenized type.
78 EAttributeType_NOTATION,
81 Specifies no type, or unsupported.
92 The RAttribute class holds an attribute's description belonging to an element.
105 IMPORT_C RAttribute();
111 IMPORT_C RAttribute Copy();
117 IMPORT_C void Close();
123 IMPORT_C void Open(const RString& aUri, const RString& aPrefix, const RString& aLocalName,
124 const TAttributeType aType = EAttributeType_NONE);
130 IMPORT_C void Open(const RString& aUri, const RString& aPrefix, const RString& aLocalName,
131 const RString& aValue, const TAttributeType aType = EAttributeType_NONE);
133 IMPORT_C const RTagInfo& Attribute() const;
134 IMPORT_C const RString& Value() const;
135 IMPORT_C TAttributeType Type() const;
141 IMPORT_C void SetValue(const RString& aValue);
146 Holds information about the attribute.
151 Holds the attribute's value.
156 Holds the attribute's type.
158 TAttributeType iType;
164 Defines a list of attributes for an element.
170 typedef RArray<RAttribute> RAttributeArray;
174 #endif //__ATTRIBUTE_H__