preload

p_GetXMLElementComment (QTP, TestComplete, VBScript)

Posted by Albert Gareev on Jul 03, 2008 | Categories: Source codeXML Data

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

Description

Get comment text, combined from all child comment nodes.

Implementation

Private Function p_GetXMLElementComment(ByRef objXMLElement)
  Dim objColl, Iter
  Dim sResult

  Set objColl = objXMLElement.ChildNodes
  sResult = ""
  For Iter=0 To objColl.length-1
    If objColl.Item(Iter).NodeName = "#comment" Then
      sResult = sResult & objColl.Item(Iter).NodeValue
    End If
  Next
  p_GetXMLElementComment = sResult
  
End Function

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