XMLAddProcessingInstruction (QTP, TestComplete, VBScript)

Categories: Source codeXML Data

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

Description

Add Processing Instruction node.

Implementation

Public Function XMLAddProcessingInstruction(ByRef objXMLDoc, ByVal sTarget, ByVal sData)
 Dim boolRC, intRC
 Dim objNode
 On Error Resume Next
 Set objNode = objXMLDoc.CreateProcessingInstruction(sTarget, sData)
 intRC = Err.Number
 On Error GoTo 0
 boolRC = isNull(objNode) OR (intRC <> 0)
 If Not boolRC Then
 objXMLDoc.InsertBefore objNode, objXMLDoc.FirstChild
 End If 
End Function

  • Leave a Reply

    * Required
    ** Your Email is never shared

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.