getTypeFromName Method

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

getTypeFromName Method

Finds an attribute by namespace name 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 getTypeFromName(ByVal strURI As String, ByVal strLocalName As _ 
String) As String

Usage Syntax

StrVal = oIVBSAXAttributes.getTypeFromName(strURI,strLocalName)

Parameters

strURI
The namespace URI or, if the namespace has no URI, an empty string.
strLocalName
The local name of the attribute.

Return Values

If the type is unknown, returns CDATA.

[C/C++]

Syntax

HRESULT getTypeFromName(
   [in] const wchar_t * pwchUri, 
   [in] int cchUri,
   [in] const wchar_t * pwchLocalName, 
   [in] int cchLocalName, 
   [out] const wchar_t ** ppwchType,
   [out] int * pcchType);

Parameters

pwchUri [in]
The namespace URI or, if the namespace has no URI, an empty string.
cchUri [in]
The length of the namespace URI string.
pwchLocalName [in]
The local name of the attribute.
cchLocalName [in]
The length of the local name string.
ppwchType [out]
The returned type of the attribute.
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 if an invalid index or no matching attribute is found.
E_FAIL
The value returned if an internal error is reported.

Remarks

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

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

getType Method | getTypeFromName Method

Applies to: ISAXAttributes/IVBSAXAttributes Interface