RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TXMLNode.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);

Use the TXMLNode object's IXMLNode interface to call the protected SetAttribute method. SetAttribute sets the value of a specified attribute of this node. 

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!