title: How to write &#34; instead of &quot; to XML output with XMLStreamWriter/IndentingXMLStreamWriter
body: <p>I'm writing data to xml files using com.sun.xml.txw2.output.IndentingXMLStreamWriter:</p>
  
  <blockquote>
  <pre><code>  OutputStream os = new FileOutputStream(pOutputFile);
    XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
    XMLStreamWriter xsw = new IndentingXMLStreamWriter(xmlof.createXMLStreamWriter(os));
  
  
    marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.setProperty(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION,
    translationXsdFile.getName());
    marshaller.setSchema(schema);
  
    marshaller.marshal(xmlObject, xsw);
    xsw.close();
  </code></pre>
  </blockquote>
  
  <p>Unforunately, this result in quotes " being encodes as: </p>
  
  <blockquote>
    <p>&amp; quot; (space added to show the entity here)</p>
  </blockquote>
  
  <p>I would like to have it encoded as </p>
  
  <blockquote>
    <p>&amp; #34; (space added to show the entity here)</p>
  </blockquote>
  
  <p>in xml outputfile without parsing it again/replacing the occurence of </p>
  
  <blockquote>
    <p>&amp; quot; (space added to show the entity here)</p>
  </blockquote>