addAttribute Method
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)
Usage Syntax
oIMXAttributes.addAttribute(strURI, _ strLocalName, _ strQName, _ strType, _ strValue)
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 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.
[C/C++]
Adds an attribute to the end of the attribute collection.
Syntax
HRESULT addAttribute( [in] BSTR strURI, [in] BSTR strLocalName, [in] BSTR strQName, [in] BSTR strType, [in] BSTR strValue);
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.
Return Values
- S_OK
- The value returned if no errors are reported.
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.
To view reference material for Visual Basic or C++ only, click the Language Filter button in the upper-left corner of the page.
See Also
Applies to: IMXAttributes Interface