title: "xsi:type" and "xmlns:xsi" in generated xml by JAXB
body: <p>I use JAXB to create folder and files hierarchy </p>
  
  <p>My model:</p>
  
  <pre><code>@XmlRootElement
  public class Root {
  
      @XmlAttribute
      private String path;
  
      @XmlElement(name = "dir")
      private ArrayList&lt;Dir&gt; rootContentDirs = null;
  
      @XmlElement(name = "file")
      private ArrayList&lt;FileObj&gt; rootContentFiles = null;
  
  
      public void setRootContentDirs(ArrayList&lt;Dir&gt; rootContentDirs) {
          this.rootContentDirs = rootContentDirs;
      }
  
      public void setRootContentFiles(ArrayList&lt;FileObj&gt; rootContentFiles) {
          this.rootContentFiles = rootContentFiles;
      }
  
      public void setPath(String path) {
          this.path = path;
      }
   }
  
  public class Dir {
  
      @XmlAttribute
      private String name;
  
      @XmlElement(name = "dir")
      private ArrayList dirs = null;
  
      @XmlElement(name = "file")
      private ArrayList files = null;
  
      public void setName(String name) {
          this.name = name;
      }
  
      public void setDirs(ArrayList dirs) {
          this.dirs = dirs;
      }
  
      public void setFiles(ArrayList files) {
          this.files = files;
      }
   }
  
  public class FileObj{
  
     @XmlAttribute
     private String name;
     @XmlAttribute
     private long size;
     @XmlAttribute
     private String type;
  
  
     public void setName(String name) {
         this.name = name;
     }
  
     public void setSize(long size) {
         this.size = size;
     }
  
     public void setType(String type) {
         this.type = type;
     }
  }
  </code></pre>
  
  <p>I want to make tree of dirs and files:</p>
  
  <pre><code>public class XmlByJaxb extends Generator {
  
  private static final String JAXB_XML = "./jaxb.xml";
  private static Root root = null;
  
  @Override
  public void output() throws IOException {
      JAXBContext context = null;
      Marshaller m = null;
      try {
          context = JAXBContext.newInstance(Root.class, Dir.class, FileObj.class);
          m = context.createMarshaller();
          m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
          m.marshal(root, new File(JAXB_XML));
      } catch (JAXBException e) {
  
      }
  }
  
  @Override
  public void run() {
      ArrayList&lt;FileObj&gt; rootFiles = addFiles(dir);
      ArrayList&lt;Dir&gt; rootDirs = make(dir);
  
      root = new Root();
      root.setPath(dir.getPath());
      root.setRootContentFiles(rootFiles);
      root.setRootContentDirs(rootDirs);
  /.../
  }
  </code></pre>
  
  <p>But I hava strange "xsi:type" and "xmlns:xsi" in generated xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;root path="/home/phlamey/IdeaProjects/FileUtillite"&gt;
  &lt;dir name="src"&gt;
      &lt;dir xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="dir" name="test"&gt;
          &lt;dir xsi:type="dir" name="java"&gt;
              /.../ 
  </code></pre>
  
  <p>So my question: what does this mean and how does remove this?</p>