Magazine |
| | Community |
| | Workshop |
| | Tools & Samples |
| | Training |
| | Site Info |
|
|
||||||||
|
Sets the value of the named attribute.
Syntax
HRESULT setAttribute( BSTR name, VARIANT value);
Parameters
- name
- [in] Name of the attribute. If an attribute with that name already exists, its value is changed. If an attribute with that name does not exist, it is created.
- value
- [in] Value for the named attribute.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
If an attribute with the supplied name already exists, this method changes its value to the supplied value parameter. The supplied string is not parsed, so any markup is treated as literal text (such as syntax to be recognized as an entity reference), and needs to be appropriately escaped by the implementation when it is written out.
In order to assign an attribute value that contains entity references, the user must create an IDOMAttribute object plus any IDOMText and IDOMEntityReference objects, build the appropriate subtree, and call the setAttributeNode method.
See Also
Does this content meet your programming needs? Write us!
© 1998 Microsoft Corporation. All rights reserved. Terms of use.