|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CAttributes: public CInterface { public: CAttributes(); virtual ~CAttributes(); public: virtual int GetLength() = 0; virtual CString GetUri(int nIndex) = 0; virtual CString GetLocalName(int nIndex) = 0; virtual CString GetQName(int nIndex) = 0; virtual CString GetType(int nIndex) = 0; virtual CString GetValue(int nIndex) = 0; virtual int GetIndex( const CString &strUri, const CString &strLocalName) = 0; virtual int GetIndex(const CString &strQName) = 0; virtual CString GetType( const CString &strUri, const CString &strLocalName) = 0; virtual CString GetType(const CString &strQName) = 0; virtual CString GetValue( const CString &strUri, const CString &strLocalName) = 0; virtual CString GetValue(const CString &strQName) = 0; };
The abstract interface for lists of XML attributes.
This interface allows access to a list of attributes in three different ways:
The list will not contain attributes that were declared
#IMPLIED
but not specified in the start tag. It will also not
contain attributes used as namespace declarations (
xmlns*
) unless
the
http://xml.org/sax/features/namespace-prefixes
feature is set to
true
(it is
false
by
default).
If the namespace-prefixes feature (see above) is
false
,
access by qualified name may not be available; if the
http://xml.org/sax/features/namespaces
feature is
false
, access by namespace-qualified names
may not be available.
The order of attributes in the list is unspecified, and will vary from implementation to implementation.
Constructor/Destructor Summary | |
CAttributes
();
����������Constructs the list of attributes. |
|
~CAttributes
();
����������Destroys the list of attributes. |
Function Summary | |
int
|
GetLength
();
����������Gets the number of attributes in this list. |
CString
|
GetUri
(int nIndex);
����������Looks up an attribute's namespace URI by index. |
CString
|
GetLocalName
(int nIndex);
����������Looks up an attribute's local name by index. |
CString
|
GetQName
(int nIndex);
����������Looks up an attribute's XML 1.0 qualified name by index. |
CString
|
GetType
(int nIndex);
����������Looks up an attribute's type by index. |
CString
|
GetValue
(int nIndex);
����������Looks up an attribute's value by index. |
int
|
GetIndex
(const CString &strUri, const CString &strLocalName);
����������Looks up the index of an attribute by namespace name. |
int
|
GetIndex
(const CString &strQName);
����������Looks up the index of an attribute by XML 1.0 qualified name. |
CString
|
GetType
(const CString &strUri, const CString &strLocalName);
����������Looks up an attribute's type by namespace name. |
CString
|
GetType
(const CString &strQName);
����������Looks up an attribute's type by XML 1.0 qualified name. |
CString
|
GetValue
(const CString &strUri, const CString &strLocalName);
����������Looks up an attribute's value by namespace name. |
CString
|
GetValue
(const CString &strQName);
����������Looks up an attribute's value by XML 1.0 qualified name. |
Constructor/Destructor Detail |
CAttributes();
Constructs the list of attributes.
virtual ~CAttributes();
Destroys the list of attributes.
Function Detail |
virtual int GetLength() = 0;
Gets the number of attributes in this list.
Once you know the number of attributes, you can iterate through the list.
virtual CString GetUri(int nIndex) = 0;
Looks up an attribute's namespace URI by index.
nIndex
- the attribute index (zero-based)virtual CString GetLocalName(int nIndex) = 0;
Looks up an attribute's local name by index.
nIndex
- the attribute index (zero-based)virtual CString GetQName(int nIndex) = 0;
Looks up an attribute's XML 1.0 qualified name by index.
nIndex
- the attribute index (zero-based)virtual CString GetType(int nIndex) = 0;
Looks up an attribute's type by index.
The attribute type is one of the strings
"CDATA"
,
"ID"
,
"IDREF"
,
"IDREFS"
,
"NMTOKEN"
,
"NMTOKENS"
,
"ENTITY"
,
"ENTITIES"
, or
"NOTATION"
(always in upper case).
If the reader has not read a declaration for the attribute,
or if the reader does not report attribute types, then it must
return the value
"CDATA"
as stated in the XML 1.0 Recommentation
(clause 3.3.3, "Attribute-Value Normalization").
For an enumerated attribute that is not a notation, the
reader will report the type as
"NMTOKEN"
.
nIndex
- the attribute index (zero-based)virtual CString GetValue(int nIndex) = 0;
Looks up an attribute's value by index.
If the attribute value is a list of tokens (
IDREFS
,
ENTITIES
, or
NMTOKENS
),
the tokens will be concatenated
into a single string with each token separated by a
single space.
nIndex
- the attribute index (zero-based)virtual int GetIndex( const CString &strUri, const CString &strLocalName) = 0;
Looks up the index of an attribute by namespace name.
strUri
- the namespace URI, or the empty string if
the name has no namespace URIstrLocalName
- the attribute's local name-1
if it does not
appear in the listvirtual int GetIndex(const CString &strQName) = 0;
Looks up the index of an attribute by XML 1.0 qualified name.
strQName
- the qualified (prefixed) name-1
if it does not
appear in the listvirtual CString GetType( const CString &strUri, const CString &strLocalName) = 0;
Looks up an attribute's type by namespace name.
strUri
- the namespace URI, or the empty string if
the name has no namespace URIstrLocalName
- the attribute's local namevirtual CString GetType(const CString &strQName) = 0;
Looks up an attribute's type by XML 1.0 qualified name.
strQName
- the qualified (prefixed) namevirtual CString GetValue( const CString &strUri, const CString &strLocalName) = 0;
Looks up an attribute's value by namespace name.
strUri
- the namespace URI, or the empty string if
the name has no namespace URIstrLocalName
- the attribute's local namevirtual CString GetValue(const CString &strQName) = 0;
Looks up an attribute's value by XML 1.0 qualified name.
strQName
- the qualified (prefixed) name
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |