RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLNode.SetAttribute Method

Sets the value of one of this node's attributes.

Pascal
procedure SetAttribute(const AttrName: DOMString; const Value: OleVariant);
C++
__fastcall SetAttribute(const DOMString AttrName, const OleVariant Value);

SetAttribute is the write implementation for the Attributes property. 

AttrName is the name of the attribute. If the attribute already exists for the node, its value is changed. If the attribute does not already exist, a new attribute is created. 

Value is the value to assign to the attribute. This value is a string that is not parsed. Any markup (for example, for an entity reference) is treated as literal text, and must include appropriate escape sequences. If Value is NULL, the attribute is removed from this node. If Value is an empty string, the attribute is assigned an empty value. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!