title: Jstree save tree to xml file after drag and drop
body: <p>using jstree plugin I input the tree data from an xml file. I need to save the xml data after drag and drop operation on a button click.
  The data.inst.get_xml("nest", -1, li_attr, a_attr) event gives the current  xml. How do I save this to an xml file in MVC 3 view</p>
  
  <p>This is the javascript used to render the tree-</p>
  
  <pre><code>$(document).ready(function () {
      li_attr = ["id", "class"];
  
      a_attr = ["href"];
  
      $("#Sampletree").jstree({
  
          "xml_data": {
              "ajax": {
                  "url": "../../Content/Files/Sample.xml"
              },
              "xsl": "nest"
          },
          "plugins": ["themes", "xml_data", "dnd", "ui"
      },
  
      {
          "dnd": {
              "drop_finish": function () {
                  alert("DROP");
              },
              "drag_check": function (data) {
                  if (data.r.attr("id") == "phtml_1") {
                      return false;
                  }
                  return {
                      after: false,
                      before: false,
                      inside: true
                  };
              },
              "drag_finish": function (data) {
                  alert("DRAG OK");
              }
          }
  
      })
  
      .bind("select_node.jstree", function (e, data) {
          alert(data.inst.get_xml("nest", -1, li_attr, a_attr)
  
      });
  
  
  });
  </code></pre>