p_SetXMLElementAttrText (QTP, TestComplete, VBScript)

Categories: Source codeXML Data

Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript)

Description

Set value of a child attribute.

Implementation

Private Function p_SetXMLElementAttrText(ByRef objXMLElement, ByVal sAttrName, ByVal sValue)
 Dim boolRC, intRC
 On Error Resume Next
 Call objXMLElement.SetAttribute(sAttrName, sValue)
 intRC = Err.Number
 On Error GoTo 0
 boolRC = intRC <> 0 
 If boolRC Then
 p_SetXMLElementAttrText = False
 Exit Function
 End If 
 p_SetXMLElementAttrText = True
End Function

Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by the author is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.