title: Alternative to IndentingXMLStreamWriter.java
body: <p>Is their an alternative to IndentingXMLStreamWriter.java i've always had some sort of issue at some point in which i am unable to compile though it goes away after a while. So I was wondering if their was an alternate way to indent manually parsed XML files </p>
  
  <p>though the error message is slightly differnt when it is compiled as part of a netbeans module... the paths are alterered with ~ for anyone thats wondering =p</p>
  
  <pre><code>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\MasterDeckXMLImporterExporter.java:5: package com.sun.xml.internal.txw2.output does not exist
  import com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter;
  Note: Attempting to workaround 6512707
  warning: No processor claimed any of these annotations: [javax.xml.bind.annotation.XmlValue, javax.xml.bind.annotation.XmlSeeAlso, javax.xml.bind.annotation.XmlAccessorType, javax.xml.bind.annotation.XmlRootElement, javax.xml.bind.annotation.XmlAttribute]
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\MasterDeckXMLImporterExporter.java:5: package com.sun.xml.internal.txw2.output does not exist
  import com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter;
  
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\MasterDeckXMLImporterExporter.java:68: cannot find symbol
  symbol  : class IndentingXMLStreamWriter
  location: class com.spectre.util.MasterDeckXMLImporterExporter
              xsw = new IndentingXMLStreamWriter(xsw);
  2 errors
  3 warnings
  C:\Program Files\jmonkeyplatform\harness\suite.xml:182: The following error occurred while executing this line:
  C:\Program Files\jmonkeyplatform\harness\common.xml:206: Compile failed; see the compiler error output for details.
  </code></pre>
  
  <p>Just to be a bit clear on things this would be how i would use stax</p>
  
  <pre><code>import com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter;
  
  XMLStreamWriter xsw = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(new File("Blah")));
  xsw = new IndentingXMLStreamWriter(xsw);
  xsw.writeStartDocument();
  xsw.writeStartElement("map");
  for (Map.Entry&lt;String, Date&gt; entry : map.entrySet()) {
       xsw.writeEmptyElement("entry1");
       xsw.writeAttribute("Name", entry.getKey());
       xsw.writeAttribute("date", sdf.format(entry.getValue()));
   }
   xsw.writeEndElement();
   xsw.writeEndDocument();
   xsw.close();
  </code></pre>