title: Upload XML File in AngularJS
body: <p>I just started learning AngularJS. My requirement is to upload the XML file from UI, which will further converted into JSON object. I had tried and google it but not found any proper solution. Please someone help me. thnx</p>
  
  <p>this is my file and button code in html</p>
  
  <pre><code>&lt;input type="file" id="importFile" mg-model="aclFile"/&gt;
  &lt;input type="button" class="btn green" ng-click="uploadAclFile(aclFile)" value="Import" /&gt;
  </code></pre>
  
  <p>And this is angular js function</p>
  
  <pre><code>$scope.uploadAclFile = function(xmlData) {
  alert("xmlData: " + doc);
  }   
  </code></pre>