The sample code provided as an example of how to use the MSXML2 library to send and receive XML documents.
Disclaimer : The code shown below is just example code to create XML documents. AuthentiCom will not be held liable for any damages, downtime or support issues involved or incurred from use of the code samples below.
Visual Basic sample code. This
sample demonstrates how to :
This sample is currently used to test connections at AuthentiCom by AuthentiCom. The URL used in the sample if fictitious. |
Private Sub
VBAppExample() Dim dom As New msxml2.DOMDocument Dim req As New msxml2.XMLHTTP dom.Load "c:\dltest.xml" req.open "POST", "http://www.AuthentiCom.com/notreal.asp", False req.send dom MsgBox req.responseText Set dom = Nothing Set req = Nothing Unload Me End Sub |
ASP Post (Active Server Page sample code).
This sample demonstrates how to:
This sample was copied from a third party source and AuthentiCom is not responsible for it in any form. |
<%@ Language=VBScript %> <% dim xmlHTTP ' as msxml2.XMLHTTP dim objXML dim objXML2 'The XMLDOM object is created set objXML = CreateObject("microsoft.XMLDOM") objXML.async = false 'loads an xml file. Can use the .loadXML function to load from a string objXML.load server.MapPath("clientlist.xml") 'create an XMLHTTP transport object set xmlHTTP = createobject("msxml2.xmlhttp") 'open a post connection to a page xmlhttp.open "POST", "http://home.somewhere.com/test/HTTP_Receive.asp", false 'send the XML to the page xmlhttp.send objXML.xml 'view the response from the page the xml was sent to Response.Write xmlhttp.responsexml.xml set xmlhttp = nothing set objXML = nothing %> |