addAttribute Method1

 

Adds an attribute to the end of the attribute collection.

Visual Basic Implementation Syntax

Sub addAttribute(ByVal strURI As String, _  
                 ByVal strLocalName As String, _   
                 ByVal strQName As String, _  
                 ByVal strType As String, _  
                 ByVal strValue As String)  

Visual Basic Usage Syntax

oIMXAttributes.addAttribute(strURI, _  
                            strLocalName, _  
                            strQName, _  
                            strType, _  
                            strValue)  

Adds an attribute to the end of the attribute collection.

C/C++ Syntax

HRESULT addAttribute(  
    [in] BSTR strURI,  
    [in] BSTR strLocalName,  
    [in] BSTR strQName,  
    [in] BSTR strType,  
    [in] BSTR strValue);  

Return Values

S_OK
The value returned if no errors are reported.

Parameters

strURI
The namespace Uniform Resource Identifier (URI) or, if the namespace has no URI, an empty string.

strLocalName
The local name of the attribute.

strQName
The XML 1.0 qualified name or, if the qualified name is not available, an empty string.

strType
A string representing the attribute type.

strValue
A string representing the attribute's default value specified by "#IMPLIED", "#REQUIRED", or "#FIXED", or Null if none applies. This value string is represented by the attribute's default value, or empty if there is none.

Remarks

To maximize efficiency, the addAttribute method does not check if the attribute is in the list. Therefore, the user application should check for the existence of an attribute before adding it to the bottom of the attribute list.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

IMXAttributes Interface