XMLAddProcessingInstruction (QTP, TestComplete, VBScript)
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