Utility method that sets an attribute value on an element. Will clear any existing attribute if value is
null, empty, or matches the default value.
Namespace: DXMLBase.XdsAssembly: DXMLBase (in DXMLBase.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static void setAttr(
XmlElement element,
string attrName,
string value,
string defaultValue
)
Public Shared Sub setAttr (
element As XmlElement,
attrName As String,
value As String,
defaultValue As String
)
public:
static void setAttr(
XmlElement^ element,
String^ attrName,
String^ value,
String^ defaultValue
)
static member setAttr :
element : XmlElement *
attrName : string *
value : string *
defaultValue : string -> unit
Parameters
- element
- Type: System.XmlXmlElement
[Missing <param name="element"/> documentation for "M:DXMLBase.Xds.XdsUtil.setAttr(System.Xml.XmlElement,System.String,System.String,System.String)"]
- attrName
- Type: SystemString
The attribute value. - value
- Type: SystemString
The value to set (may be null or empty) - defaultValue
- Type: SystemString
The default value for the attribute (may be empty, may not be null).
See Also