create a XML file



how can I create a XML file with java which looks like this when opened:

<archive name="archive1">
  <file name="xx">
    <size>100</size>
    <ext>jpg</ext>
  </file>
</archive>


thanks for help in advance! .