XdsUtilsetNonEmptyAttribute Method |
Set an XML attribute on an element only if the attribute value is non-null and non-empty. Removes
any existing attribute.
Namespace: DXMLBase.XdsAssembly: DXMLBase (in DXMLBase.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static bool setNonEmptyAttribute(
XmlElement target,
string attrName,
string attrValue
)
Public Shared Function setNonEmptyAttribute (
target As XmlElement,
attrName As String,
attrValue As String
) As Boolean
public:
static bool setNonEmptyAttribute(
XmlElement^ target,
String^ attrName,
String^ attrValue
)
static member setNonEmptyAttribute :
target : XmlElement *
attrName : string *
attrValue : string -> bool
Parameters
- target
- Type: System.XmlXmlElement
Element to receive attribute - attrName
- Type: SystemString
Name of the XML attribute - attrValue
- Type: SystemString
Value of the XML attribute
Return Value
Type:
Booleantrue if the attribute was set, false otherwise
See Also