ChildElementByName (QTP, TestComplete, VBScript)
Parent page: Service Functions – MSXMLDOM (QTP, TestComplete, VBScript)
Description
Returns child node by tag name.
Implementation
Public Function ChildElementByName(ByRef objXMLParent, ByVal sTagName)
 Dim objNode
 If objXMLParent is Nothing Then
  Set ChildElementByName = Nothing
  Exit Function
 End If
 Set objNode = objXMLParent.SelectSingleNode("./"&sTagName)
 If isNull(objNode) Or (objNode is Nothing) Then
  Set ChildElementByName = Nothing
 Else
  Set ChildElementByName = objNode
 End If
 
End Function
 

