XMLParserItf Interface CATISAXAttributes

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATISAXAttributes

Interface for a list of XML attributes.

This interface allows access to a list of attributes in three different ways:

  1. by attribute index;
  2. by Namespace-qualified name; or
  3. by qualified (prefixed) name.

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.

See also:


Method Index


o GetIndex(CATUnicodeString&,unsigned int&)
Retrieves the index of an attribute by XML 1·0 qualified name.
o GetIndex(CATUnicodeString&,CATUnicodeString&,unsigned int&)
Retrieves the index of an attribute by Namespace name.
o GetLength(unsigned int&)
Retrieves the number of attributes in this list.
o GetLocalName(unsigned int,CATUnicodeString&)
Retrieves an attribute's XML 1·0 local name by index.
o GetQName(unsigned int,CATUnicodeString&)
Retrieves an attribute's XML 1·0 qualified name by index.
o GetType(unsigned int,CATUnicodeString&)
Retrieves the type of an attribute (by position).
o GetType(CATUnicodeString&,CATUnicodeString&)
Retrieves the type of an attribute (by XML 1·0 qualified name).
o GetType(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Retrieves the type of an attribute (by Namespace name).
o GetURI(unsigned int,CATUnicodeString&)
Retrieves an attribute's Namespace URI by index.
o GetValue(unsigned int,CATUnicodeString&)
Retrieves the value of an attribute (by position).
o GetValue(CATUnicodeString&,CATUnicodeString&)
Retrieves the value of an attribute (by XML 1·0 qualified name).
o GetValue(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Retrieves the value of an attribute (by Namespace name).

Methods


o GetIndex
public virtual GetIndex( const iQualifiedName,
oIndex)
Retrieves the index of an attribute by XML 1·0 qualified name.
Parameters:
iQualifiedName
The qualified (prefixed) name.
oIndex
The index of the attribute.
Returns:
The method returns E_FAIL if the attribute is not in the list, S_OK otherwise.
o GetIndex
public virtual GetIndex( const iURI,
const iLocalName,
oIndex)
Retrieves the index of an attribute by Namespace name.
Parameters:
iURI
The Namespace URI, or the empty string if the name has no Namespace URI.
iLocalName
The attribute's local name.
oIndex
The index of the attribute.
Returns:
The method returns E_FAIL if the attribute is not in the list, S_OK otherwise.
o GetLength
public virtual GetLength( oLength)
Retrieves the number of attributes in this list. Once you know the number of attributes, you can iterate through the list.
Parameters:
oLength
The number of attributes in the list.
o GetLocalName
public virtual GetLocalName( const iPosition,
oName)
Retrieves an attribute's XML 1·0 local name by index.
Parameters:
iPosition
The attribute index (zero-based).
oName
The local name, or the empty string if Namespace processing is not being performed.
Returns:
The method returns E_FAIL if the index is out of range, S_OK otherwise.
See also:
o GetQName
public virtual GetQName( const iPosition,
oName)
Retrieves an attribute's XML 1·0 qualified name by index.
Parameters:
iPosition
The attribute index (zero-based).
oName
The XML 1·0 qualified name, or the empty string if none is available.
Returns:
The method returns E_FAIL if the index is out of range, S_OK otherwise.
See also:
o GetType
public virtual GetType( const iPosition,
oType)
Retrieves the type of an attribute (by position). The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case). If the parser has not read a declaration for the attribute, or if the parser 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 parser will report the type as "NMTOKEN".
Parameters:
iPosition
The index of the attribute in the list (starting at 0).
oType
The attribute type as a string.
Returns:
The method returns E_FAIL if the index is out of range, S_OK otherwise.
See also:
,
o GetType
public virtual GetType( const iQualifiedName,
oType)
Retrieves the type of an attribute (by XML 1·0 qualified name). The return value is the same as the return value for .
Parameters:
iQualifiedName
The XML 1·0 qualified name.
oType
The attribute type as a string.
Returns:
The method returns E_FAIL if no such attribute exists, S_OK otherwise.
See also:
o GetType
public virtual GetType( const iURI,
const iLocalName,
oType)
Retrieves the type of an attribute (by Namespace name). The return value is the same as the return value for .
Parameters:
iURI
The Namespace URI, or the empty string if the name has no Namespace URI.
iLocalName
The attribute's local name.
oType
The attribute type as a string.
Returns:
The method returns E_FAIL if no such attribute exists, S_OK otherwise.
See also:
o GetURI
public virtual GetURI( const iPosition,
oURI)
Retrieves an attribute's Namespace URI by index.
Parameters:
iPosition
The attribute index (zero-based).
oURI
The Namespace URI, or the empty string if none is available.
Returns:
The method returns E_FAIL if the index is out of range, S_OK otherwise.
See also:
o GetValue
public virtual GetValue( const iPosition,
oValue)
Retrieves the value of an attribute (by position). If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.
Parameters:
iPosition
The index of the attribute in the list (starting at 0).
oValue
The attribute value as a string
Returns:
The method returns E_FAIL if the index is out of range, S_OK otherwise.
See also:
,
o GetValue
public virtual GetValue( const iQualifiedName,
oValue)
Retrieves the value of an attribute (by XML 1·0 qualified name). The return value is the same as the return value for .
Parameters:
iQualifiedName
The XML 1·0 qualified name.
oValue
The attribute value as a string, or null if no such attribute exists.
Returns:
The method returns E_FAIL if no such attribute exists, S_OK otherwise.
See also:
o GetValue
public virtual GetValue( const iURI,
const iLocalName,
oValue)
Retrieves the value of an attribute (by Namespace name). The return value is the same as the return value for .
Parameters:
iURI
The Namespace URI, or the empty string if the name has no Namespace URI.
iLocalName
The attribute's local name.
oValue
The attribute value as a string, or null if no such attribute exists.
Returns:
The method returns E_FAIL if no such attribute exists, S_OK otherwise.
See also:

This object is included in the file: CATISAXAttributes.h
If needed, your Imakefile.mk should include the module: CatXmlItfBase

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.