-1

I have this

var dname="download.xml";  
        var xmlhttp;
        if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
            //xmlhttp.overrideMimeType('text/xml');
          }
        else
          {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }

          xmlhttp.onreadystatechange=function()
          {//alert(xmlhttp.status);
         if (xmlhttp.readyState==4 || xmlhttp.status==200)
            {
                Code.tabClick('xml');
                //alert(xmlhttp.responseText);

                //document.getElementById("content_xml").innerHTML="";
                document.getElementById("content_xml").value=xmlhttp.responseText;
            }
          }
        xmlhttp.open("GET",dname,true);
        xmlhttp.send();

currently I have the static xml file to read the xml content.Now if I keep a option to browse file through this,

<input type='file' name='xmlfile'>

is it possible to read the content while the file is browsed?

Poles
  • 3,585
  • 9
  • 43
  • 91

1 Answers1

0

I think these links will useful to you

From stackoverflow

Load xml file with javascript

Community
  • 1
  • 1
lynndragon
  • 370
  • 2
  • 12