Utility method that returns the attribute value from an element, or a default value
if the attribute isn't set on the element
Namespace: DXMLBase.XdsAssembly: DXMLBase (in DXMLBase.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static string getAttr(
XmlElement element,
string attrName,
string defaultValue
)
Public Shared Function getAttr (
element As XmlElement,
attrName As String,
defaultValue As String
) As String
public:
static String^ getAttr(
XmlElement^ element,
String^ attrName,
String^ defaultValue
)
static member getAttr :
element : XmlElement *
attrName : string *
defaultValue : string -> string
Parameters
- element
- Type: System.XmlXmlElement
[Missing <param name="element"/> documentation for "M:DXMLBase.Xds.XdsUtil.getAttr(System.Xml.XmlElement,System.String,System.String)"]
- attrName
- Type: SystemString
The attribute name. - defaultValue
- Type: SystemString
The default value for the attribute (may be empty, may not be null).
Return Value
Type:
StringThe attribute value if it exists on the operation element, otherwise the default value.
See Also