-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?

1
  • ok i'm posting the full code in the question. Commented Jan 7, 2014 at 4:22

1 Answer 1

0

I think these links will useful to you

From stackoverflow

Load xml file with javascript

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.