How to translate it into visual basic,thank you.

xml China
  • 13 years ago

    <SCRIPT LANGUAGE=JavaScript>

       var ado_stream = new ActiveXObject("ADODB.Stream");
       var xml_dom = new ActiveXObject("MSXML2.DOMDocument");
       xml_dom.loadXML('<?xml version="1.0" ?> <root/>');
       xml_dom.documentElement.setAttribute("xmlns:dt", "urn:schemas-microsoft-com:datatypes");
       var l_node1 = xml_dom.createElement("file");
       l_node1.dataType = "bin.base64";
       ado_stream.Type = 1;
       ado_stream.Open();
       ado_stream.LoadFromFile("D:\\jpg.tmp");
       l_node1.nodeTypedValue = ado_stream.Read(-1);
       ado_stream.Close();
       xml_dom.documentElement.appendChild(l_node1);
       var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       xmlhttp.open("POST","http://xx.xx.xxx//upload.asp",false);
      xmlhttp.send(xml_dom);
    </SCRIPT>
















  • 13 years ago

    Look for the source code to Introducing SOAP over here:

    http://www.craigmurphy.com/vbug

    Demo T10-3 should give you some of the code that you need.  Do remember to add a reference to the MSXML DLL.  There's some useful bits in the PowerPoint slides that go with the demos.

    It's a little bit old now, however the concepts should still be of use to you.

    HTH

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger