title: XMLStreamWriter - Java 8 - writeCharacters - &#xd;
body: <p>The behavior of this method has changed in Java 8, it seems.
  I need some quick-fix for my problem.</p>
  
  <p>The problem is what I have some code which writes CR and LF after each XML node named <code>&lt;row&gt;</code>. Now (as we migrated to Java 8), instead of CR and LF the characters <code>&amp;#xd;</code> are written out. </p>
  
  <p>Again, I need a quick fix, I cannot change the StaX implementation or do anything big like that.  </p>
  
  <pre><code>    while (reader.hasNext()){
          event = reader.next();
          if (event == XMLStreamConstants.START_ELEMENT){
  
              if (reader.getLocalName().equals("row")){
  
                  writer.writeCharacters("\r\n"); /// this is my problem now!!! 
                  writer.writeStartElement(reader.getLocalName());
  
                  n = reader.getAttributeCount();
                  for (int i=0; i&lt;n; i++){
                      name = reader.getAttributeName(i).getLocalPart();
                      value = reader.getAttributeValue(i);
  
                                      ...
                      }
          }
  </code></pre>