getTypeFromQName Method

 

Finds an attribute by XML 1.0 qualified name (QName) and returns the attribute's type, as declared in the document type definition (DTD) or schema. If a DTD or schema does not exist or the schema type does not map directly to a DTD attribute type, the return value is "CDATA".

Visual Basic Implementation Syntax

Function getTypeFromQName(ByVal strQName As String) As String  

Visual Basic Usage Syntax

StrVal = oIVBSAXAttributes.getTypeFromQName
(strQName)  

Parameters

strQName
The qualified name.

Return Values

If the type is unknown, returns CDATA.

C/C++ Syntax

HRESULT getTypeFromQName(  
   [in] const wchar_t * pwchQName,   
   [in] int cchQName,  
   [out] const wchar_t ** ppwchType,  
   [out] int * pcchType);  

Parameters

pwchQName[in]
The qualified name.

cchQName[in]
The length of the qualified name string.

ppwchType[out]
The returned type of the attribute. ppwchType should not be modified or deleted, because this can cause undefined behavior in the SAX parser. If you want to preserve the value that was returned in ppwchType, you should make a deep copy.

pcchType[out]
The length of the attribute-type string.

Return Values

S_OK
The value returned if the attribute type is returned successfully.

E_INVALIDARG
The value returned for an invalid index or if no matching attribute is found.

E_FAIL
The value returned if an internal error occurs.

Remarks

The returned attribute type can be (but is not limited to) one of the following: CDATA, ID, IDREF, IDREFS, NMTOKEN, NMTOKENS, ENTITY, ENTITIES.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXAttributes Interface

See Also

getType Method1