vb to xml sending data to the server and save it as xml file

webmasterbeta

New Member
Currently i devloping a program through which user can send the data fromthe client to the sever i am using vb program as a clientI am not able to save a file on the severVB ProgramDim objectSendXMLDOM As New MSXML.DOMFreeThreadedDocumentDim objXMLHTTP As New MSXML.XMLHTTPRequestPrivate Sub cmdAdd_Click()AddingIntoXmlDomEnd SubFunction AddingIntoXmlDom()Dim s As StringDim Name, Address As StringName = txtName.TextAddress = txtAddress.Texts = "<?xml version='1.0'?>"s = s + "<PUBLISHERS>"s = s + "<PUBLISHER>"s = s + "<NAME>" & Name & "</NAME>"s = s + "<ADDRESS>" & Address & "</ADDRESS>"s = s + "</PUBLISHER>"s = s + "</PUBLISHERS>"With objectSendXMLDOM.async = False.Load s.save "http://localhost/x.xml"End WithWith objXMLHTTP.open "POST", "http://localhost/updatedata.asp", False.send objectSendXMLDOMEnd With---------------Asp program----------------<%Set doc = Server.CreateObject("MICROSOFT.XMLDOM")doc.load(Request)Set result = Server.CreateObject("MICROSOFT.XMLDOM")Response.ContentType = "text/xml"result.save(server.MapPath("x.xml"))%>
 
Back
Top